LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-24-2004, 09:35 AM   #1
CodeCrush
LQ Newbie
 
Registered: Mar 2004
Distribution: Debian
Posts: 10

Rep: Reputation: 0
mysql_connect problem w/apache+php


I am well aware that similar questions have been asked before, but I've not
been able to find a solution that works in my case.

I have:
Debian
Apache 1.3.26
PHP 4.3.4
MySQL 4.0.15

All was installed with apt and has been working well, but then I installed
php4-cgi because I'm in need of running some php scripts from command
line as well as through apache. Aparently this broke my apache/php/mysql.

I can now run php scripts from command line like: php4 myscript.php
And this script can connect to mysql and do queries etc.
But all my web-php scripts that interact with mysql now comes up with this:

Call to undefined function: mysql_connect()

phpinfo() gives the --with-mysql=shared, and says the config file is
/etc/php4/apache/php.ini.
extension_dir is /usr/lib/php4/20010901

I also have an /etc/php4/cgi/php.ini file, and both config files have the
extension=mysql.so uncommented. There is also a /usr/lib/php4/20020429
directory, and this directory contains the mysql.so file. The 20010901 dir
is empty.

I tried copying the mysql.so file from the 20020429 directory to the
20010901 directory, but to no avail.

It should be possible to run php on both the command line and as an
apache module shouldn't it?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
php mysql_connect error compu73rg33k Linux - Software 11 04-02-2005 06:37 AM
PHP mysql_connect Guru - Install Question/Issue whohasit Programming 4 07-16-2004 07:28 PM
Redhat Enterprise AS, php-mysql-4.3.3-4.1.i386.rpm, mysql_connect() error apradhan Linux - Distributions 0 02-18-2004 04:11 PM
Redhat PHP 4.2 Problem, no mysql_connect() nehalem Linux - Software 1 11-20-2003 01:12 AM
Apache php index.php problem neurotic Linux - Software 3 11-18-2003 07:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration