Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Intermittent bug with mysql_fetch_array()


  • You cannot reply to this topic
1 reply to this topic

#1 pbedard

  • Community Member
  • 3 posts
  • Real Name:Pascal Bédard
  • Location:Canada

Posted 06 June 2003, 14:50

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?

#2 pbedard

  • Community Member
  • 3 posts
  • Real Name:Pascal Bédard
  • Location:Canada

Posted 06 June 2003, 15:37

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!