Archived

This topic is now archived and is closed to further replies.

pbedard

Intermittent bug with mysql_fetch_array()

2 posts in this topic

Hi,

to about every 3 or 4 pages loaded on my version of OS Commerce (2.1), I got this warning message:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/html/catalog/includes/functions/database.php on line 39

 

I thought it could be because the connection link isn't reset at the end of each page but, after calling tep_db_close() and tep_db_free_result(), i still get the same warning 1 times on 5 approximately.

 

Is there someone that ever got this trouble?

Share this post


Link to post
Share on other sites

I was looking on my admin side and this bug doesn't appear. I checked in the application_top.php page and I saw a differnce between my DB_SERVER defines :

 

On the administration side :

 

define('DB_SERVER', $HTTP_ENV_VARS['HOSTNAME']);

 

On the catalog side :

 

define('DB_SERVER','localhost');

 

So, I changed the catalog side, and the bug never happened again!

Share this post


Link to post
Share on other sites