View Full Version : Weird Error Message

November 15th, 2007, 09:50 AM
This morning we have this warning or error message on all pages of our gallery, Crop Addict Gallery (http://www.cropaddict.com/photopost), under the log in option.

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home2/croptcom/public_html/photopost/pp-inc.php on line 753

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home2/croptcom/public_html/photopost/pp-inc.php on line 756

It wasn't there last night - not sure what time it appeared. Even when I'm logged in under admin it appears. Not sure how to get rid of it. And we haven't made any admin changes.

Any thoughts?

Chuck S
November 15th, 2007, 10:15 AM
What version are you running? Try setting your debug option to display errors and see if it tells you the real error and post that here so we may assist.

November 15th, 2007, 11:52 AM
Hi Chuck,

We're running 5.3

I did as suggested and set the Debug to display errors and then it gave me this:

We're sorry, but the system experienced an unrecoverable error. Please try again later.


Query: SELECT id,user,userid,cat,storecat,title,bigimage,height,width, id*0+RAND() as rand_col FROM pp_photos WHERE approved=1 ORDER BY rand_col DESC LIMIT 17

Result: Out of memory (Needed 129732 bytes)

Database handle: Resource id #6

I tested to see if we could still upload, it allows us to but we get a brief error and then it goes through. Too fast for me to copy the error message.

Chuck S
November 15th, 2007, 12:03 PM
You can turn off your random photo block on the sidebar. Your mysql is running out of memory trying to cycle through and grab photos.

You can also try upgrading to Photopost 6.0 which has had some speed enhancements might help you.

November 15th, 2007, 12:13 PM
Thanks Chuck. That did the trick :)

What does upgrading entail?

Chuck S
November 15th, 2007, 12:34 PM
Basically downloading the build and uploading the unzipped contents to your photopost directory after deleting the config files install.php then you run upgrade.php and select the 5.3 upgrades forward. You can then delete upgrade.php

Upgrade instructions are included in the documentations directory of the download.

November 15th, 2007, 12:50 PM
Thanks Chuck. I'll add that to the list for my webdeveloper. :)