You are here:  » PHP warnings

Support Forum



PHP warnings

Submitted by AD_Mega on Thu, 2008-07-17 21:14 in

I upgraded to the latest version of php and I'm getting these php warnings

[17-Jul-2008 11:19:18] PHP Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /var/www/html/html/header.php on line 61
[17-Jul-2008 11:19:18] PHP Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /var/www/html/html/header.php on line 61
[17-Jul-2008 11:19:18] PHP Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /var/www/html/config.inc on line 2
[17-Jul-2008 11:19:18] PHP Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /var/www/html/config.inc on line 4
[17-Jul-2008 11:19:18] PHP Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /var/www/html/config.inc on line 2
[17-Jul-2008 11:19:18] PHP Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /var/www/html/config.inc on line 4
[17-Jul-2008 11:19:18] PHP Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /var/www/html/includes/database.php on line 17

Submitted by support on Thu, 2008-07-17 21:17

Hi Adrian,

That looks pretty fundamental, as if your new PHP installation's MySQL libraries are not working. What happens if you browse to setup.php in your Price Tapestry installation - how do the setup tests progress?

Cheers,
David.

Submitted by AD_Mega on Thu, 2008-07-17 21:21

Checking database connection...PASS

Checking database selection...PASS

Checking database tables...PASS

Setup Completed!

Using PHP Version 5.2.6

Using MySQL Version 5.0.27-standard-log

Submitted by support on Thu, 2008-07-17 21:24

That's strange, as setup.php performs uses the same database code (and runs a test query).

Could you email me a link to this installation and i'll take a look...

Cheers,
David.

Submitted by AD_Mega on Thu, 2008-07-17 21:30

You want the link to my website? I'm getting the warning in my php error log. The website seems to work fine.

Submitted by support on Thu, 2008-07-17 21:32

Ah, sorry - that makes sense.

Ok - is it possible to correlate the log entries with viewing a specific page?

In other words, is it every single page view that causes the warnings, or just, for example, running a search?

One thing that is slightly confusing from the log entries is that it refers to a file called "config.inc"; which isn't part of Price Tapestry ordinarily (it has a file called config.php)...

Cheers,
David.

Submitted by AD_Mega on Thu, 2008-07-17 21:49

I cleared the php error log and so far I haven't got the errors again. Maybe the database was restarted at that time. I'll keep checking to see if I get the errors again.