Random pics sometimes not displaying Random pics sometimes not displaying
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Random pics sometimes not displaying

Started by ladeyo, February 06, 2004, 09:33:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ladeyo

hey i am having a little problem quite similar to jdbaranger's problem where the album thumbnail wouldn't display and is jus a tiny box.. i had applied the mod to cpg 1.2.1 .. and it seems to work but its just that little problem with the displaying of the thumbnail of a album. and another strange thing is happening.

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.nuffrespect.net%2Fpublic%2Fstrange.jpg&hash=cdfd058bb6b014ebed4b6b6e4a7194b8672aba60)

Sometimes when i go to the gallery the random photo section shows that there is no pics to display. it doesn't happen all the time and i dont know what may be causing this. please help me. thanks.

Casper

Hi,

the occasional failure of the random pics is probably due to a timeout caused by too many queries being run.  You are asking for 30 lastup and 30 random pics.  Reducing this will probably clear the problem.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

ladeyo

thanks alot for the tip .. I'll try reducing the number.. its jus strange because i had always had it to that setting. i guess i didn't notice it before :s

-edit- I tried lowering the number if pics that displayed but im still having the same problem  :(  :cry:

Casper

ah, yes, but you added a lot more pics today, didn't you.   :wink:

edit;  and you didn't drop it that much.  Try 15 of each, and see what happens then.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

ladeyo

hmmm... i set it to 15 each..but still getting the same response :s quite strange... see .. my gallery was once huge. had quite a number of pics but then something happened with my server and i lost all my data ... i was able to recover the sql database and now im just adding the pics i had saved.. and now im seeing another strange thing... when the albums are set to display the "last uploaded" pic as a thumbnail for the album ... it seems as if its grabbing the wrong pics ... like say i have a album of cars and one of people... the thumb for the cars album would have a picture of a person. instead of a car... :s dunno if you can make any sense out of that but lol ...alot of things are happening right now and its confusing me

Joachim Müller


ladeyo

ok i think i fixed the problem i was havin ... i dunno if i was supposed to do this or if it would have a toll on my server and its resources or anything ... but what i did was edit the "functions.inc.php" file... did a search for "random" and i came across this line

// if we have more than 1000 pictures, we limit the number of picture returned
                // by the SELECT statement as ORDER BY RAND() is time consuming
                if ($pic_count > 1000)


i changed the 1000 to 5000 ... i dunno if this was a good move or not but it seemed to fix the problem  :?  do you guys think that was a good move ? like..would it have a back lash later on... i may have misunderstood the line of code...my gallery had over 7000 photos with the previous version i am re-uploading my images because of a some server problems..so now i have about ..5000 pics..... hmm.well i dunno... do you think i made a good move when i switched the numbers?

Joachim Müller

Coppermine has been reported to work with 90,000+ pics in the database...

GauGau