I've followed the 'perfect setup for CentOS 5.0' and I've got everything running fairly well. However, I can't fire up my test MySQL script - I get
Fatal error: Call to undefined function mysql_connect() in /var/www/web8/web/.../mysql_up.php on line 12
So I went to the search engine and found 42,900 occurrences of this. I've poked around in the forums and found near hits to answer my problem, but nothing exact - one of the problems I'm bumping into is that so many of the answers presume that PHP is running on Windows, which doesn't really help me.
* I understand that MySQL isn't turned on by default in PHP5.
* I understand that MySQL is loaded on my system, since I'm running ISPConfig and it uses MySQL.
* I understand that my PHP probably doesn't have MySQL installed as an extension, since phpinfo says
'--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd'
and there's no table further down for it (I rather thought that 'the perfect setup' for a LAMPS install would automatically have php with MySQL, but that's another story.)
So I'm wondering - how to activate MySQL in PHP5, and it seems as if I have to recompile PHP. I’ve got 3 questions:
1) I’m guessing that I can take the entire configure command in the big box at the top of the phpinfo() display and run that (tweaking the ‘-–without-mysql’ of course). True?
2) What directory do I run this from? There’s a pile of ‘.h’ files in ‘/usr/include/php/main’ - do I go there? Or where?
3) Do I need anything else?
Thanks for any help ...