This may belong in Newbies, or Database - but I think it belongs here:
I'm a member of a long list of folks getting a fatal error when trying to connect to mysql using PHP. I'm running PHP 5.2.6 and MySQL server version 5.0.67 on a Macbook running OS X Leopard - 10.5.5.
Fatal error: Call to undefined function mysql_connect() in /opt/local/apache2/htdocs/install/save.php on line 348
No problem connecting to the server through the terminal, just through PHP scripts, so I'm assuming now that the error message is literally true - PHP can't find or doesn't know what to do with the function "mysql_connect".
Where is PHP supposed to find functions that address MySQL? Is it in a library? Maybe there's something I can do to "connect" PHP with a library containing the function? Something to do with "dependencies" maybe? I'm concerned that this may not be the only PHP - SQL function that is "undefined" and others will show up once I do get connected, but I don't know how to find out.
A search using GREP for "mysql_connect" in all non-binary files in /opt/ where the Macports installation put files turned up only a few responses. One was php.ini, but only the listing in mysql.h (which opened in Xcode - version 3.1.1) appeared to define it as a function. The other listings were just using the function - as in save.php above where the error appeared.
I also found a reference to the mysql_connect being "deprecated" in favour of mysql_real_connect. I tried that in a test file, but it also failed with a similar message.
I'm running out of ideas - can anyone suggest another direction to go??