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?
|