Hi i just updated the oscommerce shopping cart system, and now it won't connect to the database anymore. My error logs showed the following:the line in question +following states:Code:PHP Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in ......../shop/admin/includes/functions/database.php on line 19
I am not soo firm in php, but to me it looks like i have to exchange the capital letter words with the actual passwords, URL and username?Code:function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') { global $$link; if (USE_PCONNECT == 'true') { $$link = mysql_pconnect($server, $username, $password); } else { $$link = mysql_connect($server, $username, $password); } if ($$link) mysql_select_db($database); return $$link; }
If so how do I type in the DB_SERVER, as it doesn't like a '.' in the code at all and the server is a .com one.


Reply With Quote
Bookmarks