View Full Version : mysql_num_rows(): supplied argument is not a valid
July 26th, 2010, 03:27 PM
I started getting this error message today, did not make any changes, not sure what happened:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/username/public_html/pictures/forums/photopost.php on line 50
The userfield does exist in vb database.
After enabling debug mode (through phpmyadmin):
An error was encountered during execution of the query:
SELECT userid,username,email,password,usergroupid,offset,mature FROM pics_users WHERE username='username'
The query returned with an errorcode of:
Table 'username_vbdatabase.pics_users' doesn't exist
I am no longer able to administer PP using my forum uesrname.
Whats going on?
July 26th, 2010, 05:41 PM
according to the error your gallery is installed as a standalone not integrated with vbulletin.
reinstalling to integrate properly with vbulletin will fix your issue.
July 26th, 2010, 06:42 PM
Thanks. I've had it integrated for past 7 years, why would it just de integrate?
Will upgrading to latest version help?
July 26th, 2010, 07:00 PM
It would not deintegrate
The application would have to have been reinstalled as a standalone or someone has been database diving.
July 26th, 2010, 09:18 PM
Reinstall means what?
What about existing settings, photos, etc.
Do I just upgrade with new files?
I don't know about database diving, I don't mess with databases and no one else has access to the server so I am not sure what happened here.
July 26th, 2010, 11:29 PM
Well, I deleted the tables and restored from the backup. The backup was actually done after the issue came up but it for some reason fixed the issue? I restored using phpmyadmin and it kept timing out as I restored 160MB database but at the end, it gave this error:
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
MySQL said: Documentation
#1298 - Unknown or incorrect time zone: 'NULL'
July 27th, 2010, 07:37 AM
that error is not part of photopost or its database so your fine there.
The backup could not have taken place after the issue if it was fixed. Photopost looks explicity at the setting in the settings table of photopost setting 41 has the integration type. If your integrated with vb it would normally say vb3 there and we would call vb3.php however your error says your integration setting says photopost
July 27th, 2010, 10:01 AM
I did try to change that in phpmyadmin but it kept saying I don't have admin/mod permissions when I tried to access the admin page.
Also, now its doing it again but no errors. I see admin link when logged into vbulletin and when clicking on pp admin link, it takes me to login page for pp admin. It was fine few minutes ago....
but checking the phpmyadmin, it shows vb3 as the User Registration System!
Can I install fresh database and import the current photos (37k)/categories and user settings?
July 27th, 2010, 10:21 AM
Are we sure we are dealing with the proper database and tables here? Just thought I would throw that out there. the error your saying is absolute. For the program to be calling photopost.php it has to be installed as a standalone not a vb integrated.
July 27th, 2010, 10:31 AM
...and now its fixed by its self.
Would you like to take a look at the database because I have no idea whats going on?
July 27th, 2010, 10:41 AM
From one machine it takes me to PP admin page, from another it logs me into pp admin using vbulletin username. :clueless
July 27th, 2010, 06:33 PM
That would be strange but please feel free to send a url and admin login to the contact us link if you want.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.