I am having problems with a new install of gallery.
my error.log in Apache reads:
PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\\Apache2\\htdocs\\site\\gallery\\classes\\database.php on line 108,
images show up in the folder when they are uploaded (as .wsn files), however they seem to randomly disappear after an unknown time. No thumbnails show up and when an image is clicked, it doesn't appear and the file information reads:
www.site.com/gallery/sugges...php?action=addlink&catid=5 Load time so far: 0.17 seconds. Performing query: SELECT id,name,parent,validated,description,time,parentnames,parentids,numlinks,hide,lastlinktime,custom,lastedit,moderators,headerinfo,related,numsub,isalbum,type,permissions,subscribers,subscriber,mixtypes,orderlinks,totalcomments,filetitle,filename,ulsearchmax,ulsearchquery,ulsearchadult,alias,catcols,linkcols,dmozpath,sponsorlinks,views,customwrap,deleted,reqlinks,reqcoms,reqlinksdelay,priority,levelsdeep,lastposterid,lastpostername,lastcommenttime,lastthreadid,lastthreadtitle,linkshere,unvalidatedlinks,unvalidatedcomments,actaslink,countposts,subcatshtml FROM wsngallery_categories WHERE validated=1 AND deleted=0 AND hide=0 ;
Number of rows is 1 for Resource id #48
Load time so far: 0.17 seconds. Performing query: LOCK TABLES wsngallery_email WRITE, wsngallery_links WRITE, wsngallery_categories WRITE, wsngallery_members WRITE;
Load time so far: 0.17 seconds. Performing query: SELECT id,`to`,subject,message,headers,replacement,mime FROM wsngallery_email WHERE timesent=0 ORDER BY id ASC LIMIT 0,10;
Number of rows is 0 for Resource id #49
Load time so far: 0.17 seconds. Performing query: UNLOCK TABLES;
Load time so far: 0.23 seconds. Performing query: SELECT id,type,objectid,filename,filetitle,filesize,width,height,memberid,time,deleted,field,downloads,validated FROM wsngallery_attachments WHERE type='link' AND objectid=0 AND memberid=1 AND ownerip='72.130.152.101' AND time>1150070377 ORDER BY time DESC ;
Number of rows is for Unknown column 'ownerip' in 'where clause'
(web page)
12 total queries This page was created in 0.44 seconds Load time so far: 0.45 seconds. Performing query: SELECT inchat,lastchat FROM wsngallery_sessions WHERE memberid=1 LIMIT 0,1;
Unknown column 'ownerip' in 'where clause'
Number of rows is 1 for Resource id #60
Load time so far: 0.45 seconds. Performing query: SELECT memberid,starttime,time FROM wsngallery_sessions WHERE time < 1150089477 AND memberid > 0 ;
Number of rows is 0 for Resource id #61
Load time so far: 0.45 seconds. Performing query: DELETE FROM wsngallery_sessions WHERE time < 1150089477;
Load time so far: 0.45 seconds. Performing query: SELECT id,memberid,location,time,ip,browser,starttime,catid,threadid,areaname,lastsearch,nopermission,inchat,name,isrobot,lastchat,groupnamestyle,acceptims,visibility FROM wsngallery_sessions WHERE memberid=1 ;
Number of rows is 1 for Resource id #62
Load time so far: 0.45 seconds. Performing query: UPDATE wsngallery_sessions SET id='8' WHERE id=8;
Load time so far: 0.45 seconds. Performing query: UPDATE wsngallery_sessions SET memberid='1' WHERE id=8;
Load time so far: 0.45 seconds. Performing query: UPDATE wsngallery_sessions SET location='http://www.layoutyourprofile.com/gallery/suggest.php?action=addlink&catid=5' WHERE id=8;
Load time so far: 0.47 seconds. Performing query: UPDATE wsngallery_sessions SET time='1150090377' WHERE id=8;
Load time so far: 0.49 seconds. Performing query: UPDATE wsngallery_sessions SET ip='72.130.152.101' WHERE id=8;
Load time so far: 0.49 seconds. Performing query: UPDATE wsngallery_sessions SET browser='Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727)' WHERE id=8;
Load time so far: 0.49 seconds. Performing query: UPDATE wsngallery_sessions SET starttime='1150090328' WHERE id=8;
Load time so far: 0.49 seconds. Performing query: UPDATE wsngallery_sessions SET catid='5' WHERE id=8;
Load time so far: 0.49 seconds. Performing query: UPDATE wsngallery_sessions SET threadid='' WHERE id=8;
Load time so far: 0.5 seconds. Performing query: UPDATE wsngallery_sessions SET areaname='Suggest New Image' WHERE id=8;
Load time so far: 0.53 seconds. Performing query: UPDATE wsngallery_sessions SET lastsearch='0' WHERE id=8;
Load time so far: 0.53 seconds. Performing query: UPDATE wsngallery_sessions SET nopermission='0' WHERE id=8;
Load time so far: 0.53 seconds. Performing query: UPDATE wsngallery_sessions SET inchat='0' WHERE id=8;
Load time so far: 0.53 seconds. Performing query: UPDATE wsngallery_sessions SET name='doug' WHERE id=8;
Load time so far: 0.53 seconds. Performing query: UPDATE wsngallery_sessions SET isrobot='0' WHERE id=8;
Load time so far: 0.53 seconds. Performing query: UPDATE wsngallery_sessions SET lastchat='0' WHERE id=8;
Load time so far: 0.53 seconds. Performing query: UPDATE wsngallery_sessions SET groupnamestyle='admincolor' WHERE id=8;
Load time so far: 0.53 seconds. Performing query: UPDATE wsngallery_sessions SET acceptims='none' WHERE id=8;
Load time so far: 0.53 seconds. Performing query: UPDATE wsngallery_sessions SET visibility='0' WHERE id=8;
Anyhow, on second glance you didn't actually have an error in what you posted. The output I was going by could've been a leftover from the last error produced weeks ago or something. So if you're not going to post the page that has the mysql_num_rows warning on it I can't comment about it.
On the other hand I did find the need to add that field on my local copy, so it appeared to be a problem.
Honestly, I don't know if the num_rows warning is causing the issue.
What is apparent is when an image is uploaded, it isn't displayed. I had set up gallery previously and it worked ok, however setting it up on this dedicated box is giving me some trouble.
Comments on error uploading images
Usergroup: Member
Joined: Jan 16, 2006
Total Topics: 3
Total Comments: 10
I am having problems with a new install of gallery.
my error.log in Apache reads:
PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\\Apache2\\htdocs\\site\\gallery\\classes\\database.php on line 108,
images show up in the folder when they are uploaded (as .wsn files), however they seem to randomly disappear after an unknown time. No thumbnails show up and when an image is clicked, it doesn't appear and the file information reads:
File Details: , by pixels, 0 KB
ideas?
windows 2k3, apache/php/mysql.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
scripts.webmastersite.net/w...gallery/manual/articles/66
Usergroup: Member
Joined: Jan 16, 2006
Total Topics: 3
Total Comments: 10
www.site.com/gallery/sugges...php?action=addlink&catid=5
Load time so far: 0.17 seconds.
Performing query: SELECT id,name,parent,validated,description,time,parentnames,parentids,numlinks,hide,lastlinktime,custom,lastedit,moderators,headerinfo,related,numsub,isalbum,type,permissions,subscribers,subscriber,mixtypes,orderlinks,totalcomments,filetitle,filename,ulsearchmax,ulsearchquery,ulsearchadult,alias,catcols,linkcols,dmozpath,sponsorlinks,views,customwrap,deleted,reqlinks,reqcoms,reqlinksdelay,priority,levelsdeep,lastposterid,lastpostername,lastcommenttime,lastthreadid,lastthreadtitle,linkshere,unvalidatedlinks,unvalidatedcomments,actaslink,countposts,subcatshtml FROM wsngallery_categories WHERE validated=1 AND deleted=0 AND hide=0 ;
Number of rows is 1 for Resource id #48
Load time so far: 0.17 seconds.
Performing query: LOCK TABLES wsngallery_email WRITE, wsngallery_links WRITE, wsngallery_categories WRITE, wsngallery_members WRITE;
Load time so far: 0.17 seconds.
Performing query: SELECT id,`to`,subject,message,headers,replacement,mime FROM wsngallery_email WHERE timesent=0 ORDER BY id ASC LIMIT 0,10;
Number of rows is 0 for Resource id #49
Load time so far: 0.17 seconds.
Performing query: UNLOCK TABLES;
Load time so far: 0.23 seconds.
Performing query: SELECT id,type,objectid,filename,filetitle,filesize,width,height,memberid,time,deleted,field,downloads,validated FROM wsngallery_attachments WHERE type='link' AND objectid=0 AND memberid=1 AND ownerip='72.130.152.101' AND time>1150070377 ORDER BY time DESC ;
Number of rows is for Unknown column 'ownerip' in 'where clause'
(web page)
12 total queries
This page was created in 0.44 seconds
Load time so far: 0.45 seconds.
Performing query: SELECT inchat,lastchat FROM wsngallery_sessions WHERE memberid=1 LIMIT 0,1;
Unknown column 'ownerip' in 'where clause'
Number of rows is 1 for Resource id #60
Load time so far: 0.45 seconds.
Performing query: SELECT memberid,starttime,time FROM wsngallery_sessions WHERE time < 1150089477 AND memberid > 0 ;
Number of rows is 0 for Resource id #61
Load time so far: 0.45 seconds.
Performing query: DELETE FROM wsngallery_sessions WHERE time < 1150089477;
Load time so far: 0.45 seconds.
Performing query: SELECT id,memberid,location,time,ip,browser,starttime,catid,threadid,areaname,lastsearch,nopermission,inchat,name,isrobot,lastchat,groupnamestyle,acceptims,visibility FROM wsngallery_sessions WHERE memberid=1 ;
Number of rows is 1 for Resource id #62
Load time so far: 0.45 seconds.
Performing query: UPDATE wsngallery_sessions SET id='8' WHERE id=8;
Load time so far: 0.45 seconds.
Performing query: UPDATE wsngallery_sessions SET memberid='1' WHERE id=8;
Load time so far: 0.45 seconds.
Performing query: UPDATE wsngallery_sessions SET location='http://www.layoutyourprofile.com/gallery/suggest.php?action=addlink&catid=5' WHERE id=8;
Load time so far: 0.47 seconds.
Performing query: UPDATE wsngallery_sessions SET time='1150090377' WHERE id=8;
Load time so far: 0.49 seconds.
Performing query: UPDATE wsngallery_sessions SET ip='72.130.152.101' WHERE id=8;
Load time so far: 0.49 seconds.
Performing query: UPDATE wsngallery_sessions SET browser='Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727)' WHERE id=8;
Load time so far: 0.49 seconds.
Performing query: UPDATE wsngallery_sessions SET starttime='1150090328' WHERE id=8;
Load time so far: 0.49 seconds.
Performing query: UPDATE wsngallery_sessions SET catid='5' WHERE id=8;
Load time so far: 0.49 seconds.
Performing query: UPDATE wsngallery_sessions SET threadid='' WHERE id=8;
Load time so far: 0.5 seconds.
Performing query: UPDATE wsngallery_sessions SET areaname='Suggest New Image' WHERE id=8;
Load time so far: 0.53 seconds.
Performing query: UPDATE wsngallery_sessions SET lastsearch='0' WHERE id=8;
Load time so far: 0.53 seconds.
Performing query: UPDATE wsngallery_sessions SET nopermission='0' WHERE id=8;
Load time so far: 0.53 seconds.
Performing query: UPDATE wsngallery_sessions SET inchat='0' WHERE id=8;
Load time so far: 0.53 seconds.
Performing query: UPDATE wsngallery_sessions SET name='doug' WHERE id=8;
Load time so far: 0.53 seconds.
Performing query: UPDATE wsngallery_sessions SET isrobot='0' WHERE id=8;
Load time so far: 0.53 seconds.
Performing query: UPDATE wsngallery_sessions SET lastchat='0' WHERE id=8;
Load time so far: 0.53 seconds.
Performing query: UPDATE wsngallery_sessions SET groupnamestyle='admincolor' WHERE id=8;
Load time so far: 0.53 seconds.
Performing query: UPDATE wsngallery_sessions SET acceptims='none' WHERE id=8;
Load time so far: 0.53 seconds.
Performing query: UPDATE wsngallery_sessions SET visibility='0' WHERE id=8;
closing database connection
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Add an image field ownerip (text) on the add fields page or upgrade to 2.3.6.
Usergroup: Member
Joined: Jan 16, 2006
Total Topics: 3
Total Comments: 10
Hi Paul,
2.3.6 didn't fix the problem. The issue remains. I have sent you an email with the site and login credentials if you'd care to look at the site live.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
You did? I suppose I have no idea who you are.
Anyhow, on second glance you didn't actually have an error in what you posted. The output I was going by could've been a leftover from the last error produced weeks ago or something. So if you're not going to post the page that has the mysql_num_rows warning on it I can't comment about it.
On the other hand I did find the need to add that field on my local copy, so it appeared to be a problem.
Usergroup: Member
Joined: Jan 16, 2006
Total Topics: 3
Total Comments: 10
Honestly, I don't know if the num_rows warning is causing the issue.
What is apparent is when an image is uploaded, it isn't displayed. I had set up gallery previously and it worked ok, however setting it up on this dedicated box is giving me some trouble.
http://layoutprofile.com/gallery/
I'll send you another email via the contact form with credentials. Perhaps you will notice something that I have overlooked.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
There is no mysql_num_rows warning there that I can find.
I can't get into the admin panel there. Can you? There must be some sort of cookie problem or conflict.
Usergroup: Member
Joined: Jan 16, 2006
Total Topics: 3
Total Comments: 10
Yes, I can login and get to the admin panel. I've created a new user for you to attempt to login with. I've sent you another email with the info.
I'm less concerned with the mysql_num_rows error as I am with the basic problem with uploading images, etc.
Thanks Paul
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Note for readers: this was fixed by re-ensuring the field was added.
Experienced
Usergroup: Member
Joined: Jun 11, 2006
Total Topics: 15
Total Comments: 55
I was not able to do this through WSN Gallery, but used the MYSQL control panel and added the field and all worked fine as well.
Just to clearify this for some who could not figure it out:
Add a field called ownerip, varchar length 15 to the table wsngallery_attachments save the changes and all should be well.