Click to See Complete Forum and Search --> : MySQL problem!


Anon
11-12-2000, 10:15 PM
When I installed PHP, I gave it the standard --with-mysql argument. The compile seemed to go fine, but when I try to run a page that has a mysql_connect, I get:

Fatal error: Call to unsupported or undefined function mysql_connect().

Ugh! I tried recompiling PHP using the explicit path to MySQL. First, I used the path returned by "which mysql", which on my system is /usr/bin/mysql. However, the recompile crashes, with the error message:
Cannot find header files under /usr/bin/mysql.
I checked the MySQL installation manual (I installed from the RPM.) It said that the MySQL files are put into /var/lib/mysql. But when I try that as the argument to my PHP compile, I get the same error.

My question: Why doesn't PHP recognize the mysql_connect() function, even after I compiled it with the--with-mysql argument and seemed to go well? Any help is appreciated: dlobron@world.std.com. Thank you!

Anon
11-12-2000, 10:19 PM
Forgot to mention: I am running the latest version of PHP on a Mandrake 7.1 system, with the Apache Web server. I'm running PHP as CGI, not as a module. The responses to questions on the topic assumed that the questioner was using an old PHP that didn't have the MySQL commands: mine definitely should.