Forum Moderators: coopster

Message Too Old, No Replies

PHP Warnings

supplied argument is not a valid MySQL result resource

         

stuart

1:47 pm on Oct 28, 2005 (gmt 0)

10+ Year Member



Just hoping an expert might be able to shed some light on this … having recently moved servers our site is now throwing up PHP Warnings that relate to "supplied argument is not a valid MySQL result resource".

This error is intermittent and occurs as a user clicks to submit information from a web form or our shopping cart and a unique Ref is assigned (mysql_insert_id) and php scripts should send an automatic email (email sends for the webform but with no unique Ref – no email sends for the shopping cart).

New Server = php version 4.3.10, mysql version 3.23.58 on Linux 2.6.5-1.358

Old Server = php version 4.3.2 mysql version 3.23.58 running on Linux 2.4.21-9.EL.

Just if anyone knows of any obvious problems or bugs here please let me know …

TIA.
Stuart

coopster

2:52 pm on Oct 28, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I'm guessing the error was probably always there as it is likely an invalid query, meaning the syntax is incorrectly being built dynamically for certain requests. I would monitor for the error if it is intermittent and write the query to an error log on your server somewhere and email yourself when it occurs.

The reason you are starting to see these errors is likely that the error_reporting() [php.net] level is different on this new server, showing more errors than you would probably wish to have showing on a live server. Good for development, bad for LIVE environments.

Angelis

2:55 pm on Oct 28, 2005 (gmt 0)

10+ Year Member



If that doesnt help show us the code and we can pick at it to help you find the error.

stuart

3:50 pm on Oct 28, 2005 (gmt 0)

10+ Year Member



Thanks for this, We've now set an error log in the script so will see what that reports ... I'll probably be back shortly ...

Thanks again, much appreciated.