Hi All,
I have a problem with some code that uses the mysql_real_escape_string() function.
Because of issues with PHP sessions and load balancing I had to modify session handling so data is now saved to a database instead.
I’m using the code from this article:
[URL=”http://www.devshed.com/c/a/PHP/Storing-PHP-Sessions-in-a-Database/6/”]http://www.devshed.com/c/a/PHP/Storing-PHP-Sessions-in-a-Database/6/
The problem is, pages that use session variables now output the following error messages…
[QUOTE]
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) in /home/nas04l/m/midasprint.com/user/htdocs/functions/sessions.php on line 53
…and…
[QUOTE]
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/nas04l/m/midasprint.com/user/htdocs/functions/sessions.php on line 53
Whats wrong and how do I go about fixing it?! :S