I set up my php/mysql server on apache according to Kevin Yanks guide on setting up php and mysql.
When trying to run the jokes.php which is in the 4 part I get the following error when trying to connect to the database and can't figure out what is going wrong.
Here is the error when I remove the @ sign from mysql_connect
Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/httpd/html/test/jokes.php on line 22
If the page is loading and giving an error message then PHP must be working. It is more likely that MySQL is not running either that, or you need to specify the host where the server is running - usually localhost
Both are apparently running. I used the top command to see if mysqld was running and it is. I reinstalled mysql last night and will reinstall php tonight.
I'm running RedHat6.2 and PHP4.0.0 I'll let you know if a reinstall works or not. Will reinstalling PHP affect my apache server or should it be OK.
Bookmarks