[Solved]: Problems With Mid-Size and Larger Images Not Always Showing Up [Solved]: Problems With Mid-Size and Larger Images Not Always Showing Up
 

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

[Solved]: Problems With Mid-Size and Larger Images Not Always Showing Up

Started by Craig Walsh, April 22, 2008, 08:44:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Craig Walsh

Our main Coppermine gallery is at www.bark.ch  I upload the "larger" images via FTP, and then batch add them into the gallery.  They have been keyworded, captioned, etc., before they are uploaded, and this has worked very well for us.

About two weeks ago we started to encounter problems, where the mid-size image would not always show up.  I posted a thread here:

http://forum.coppermine-gallery.net/index.php/topic,51733.0.html

I also updated from 1.4.12 to 1.4.16 to see if that would fix the problem, but it didn't.

Nibbler kindly told me to shut off the EXIF data --- this is apparently a known problem.  I shut it off, and everything worked fine.

And then, although I was at 1.4.16, I was hacked.  Updated to 1.4.17 and got the folks who manage our server to remove all the offending frames.  And then hacked again.  Updated to 1.4.18 and got the folks who manage our server to remove all the frames again, and we seem to be OK on that front.

But we are back to having the intermediate images not always show up.  And now many of the larger images don't show up as well.  They are there, but Coppermine seems to time out in trying to find them.

If you look, for example, at this image:

http://www.bark.ch/displayimage.php?album=33&pos=7145

You are actually looking at the mid-size image, created by (presumably) ImageMagik when I uploaded the larger image --- and then added the larger image to Coppermine as part of a batch.

If you double-click on the image (above) you can't see the larger image --- you get, instead, an error message.  In Safari the error message says, "Safari can't open the page "http://www.bark.ch/displayimage.php?pid=14503&fullsize=1". The error was: "unknown error" (CFURLErrorDomain:302)."  I have also tried this in Firefox and IE7, with the same results.

But yet the larger image is there --- http://www.bark.ch/albums/Apr_04_08-Web/Z2Q9W2045.jpg

When I click on the random images, some are there, and some aren't.  For example, I clicked on a random image and it took me to this page --- but the page was blank:

http://www.bark.ch/displayimage.php?album=random&cat=0&pos=-7269

In another thread where someone else seemed to be having a similar problem, Nibbler suggested turning off the album keywords.  But I can't seem to find how to turn them on, or off.  There are no keywords shown in my album properties.

I have clickable keywords shut off because we have more (much more) than 100 keywords.  When I click on "Manage Keywords" (in config) nothing seems to happen --- tries to open www.bark.ch/keywordmgr.php but just sticks.

Are the keywords the issue?  Do we somehow have "too many?"

Our Coppermine gallery isn't small, but it's certainly not huge (13,592 files).

I really appreciate all of the hard work that y'all do on this forum, and know that it is a labour of love.  And I really like Coppermine software --- we have (besides www.bark.ch) six other CPG installations on the same dedicated server.  The others are operating fine, but are much smaller than www.bark.ch

But the two hacks, and the earlier know problem with the EXIF information, and now the problem with the mid-size and larger images not reliably showing up is starting to wear me down.  (I know, I know --- I should be made of stronger stuff.)

Any help with the problem d'jour would be most appreciated.  Thanks in advance.

Craig
Craig Walsh
CPG Photo Gallery - www.bark.ch
Member of the Association of Photographers (AOP)

Craig Walsh

Whoops.  I forgot to add this.  I asked our server people to please see if they could find any sort of error or problem.  They reported back earlier today:

QuoteLooking at the sites error logs we see there are no errors being thrown when the white page is displayed. This means one of two things. Either the code itself is not erroring out, and there is a logic problem; or a third party library is failing to do it's job, but isn't properly reporting the problem to PHP.
Craig Walsh
CPG Photo Gallery - www.bark.ch
Member of the Association of Photographers (AOP)

Nibbler

Try changing

if ($pos < 0 || $pid > 0) {

to

if (!isset($_GET['fullsize']) && ($pos < 0 || $pid > 0)) {

in displayimage.php

Craig Walsh

Nibbler ---

I made the change as suggested and it seems to have fixed the problem of the larger image not displaying.   Many thanks!  (If you have a moment, can you very briefly explain what was wrong, and what I changed.)

The mid-size (intermediate) images are still not showing for some of the images in the random files.  If I click on random thumbnails on the first page at www.bark.ch some work just fine, but others come up with the dreaded "Internet Explorer cannot display the webpage."

For example, I just clicked on a random image thumbnail and got the error page.  Here's the link:

http://www.bark.ch/displayimage.php?album=random&cat=0&pos=-9360

Any ideas on why the random images work sometimes, but not other times?  And any suggestions on how to fix this problem?

Again, many thanks for your help and suggestions.
Craig Walsh
CPG Photo Gallery - www.bark.ch
Member of the Association of Photographers (AOP)

Nibbler

It cuts out some very inefficient code that's not needed for the fullsize pic anyway. Try increasing your php memory limit (php.ini setting).

Craig Walsh

Thanks for the quick reply. 

Sorry for what is, I'm sure, a dumb question --- but is the php.ini setting external to Coppermine?

Any suggestion on what the setting should be?  Or is it just trial-and-error?

Craig Walsh
CPG Photo Gallery - www.bark.ch
Member of the Association of Photographers (AOP)

Nibbler

Yes. It's a PHP setting not a Coppermine setting. See http://coppermine-gallery.net/demo/cpg14x/docs/pics/anchor.gif

Double the setting until it starts working.

Ask the mysterious 'server people' if you need help with that.

Craig Walsh

Thanks again for the quick reply.

The link you provided just led me to a small image of a chain link. 

I will ask the mysterious "server people" to double the setting. 

(They're not really so mysterious:  we have a managed server, so the folks at the hosting company make these changes for us, and provide us with server support.)

Craig Walsh
CPG Photo Gallery - www.bark.ch
Member of the Association of Photographers (AOP)


Craig Walsh

The MSP's have replied:

QuoteI have increased the memory_limit on your PHP scripts. Here you can see the previous value:

[root@linux2 10001]# grep memory_limit /etc/php.ini
memory_limit = 8M      ; Maximum amount of memory a script may consume (8MB)
[root@linux2 10001]#

The new value is as follows:

[root@linux2 10001]# grep memory_limit /etc/php.ini
memory_limit = 16M      ; Maximum amount of memory a script may consume (8MB)
[root@linux2 10001]#

I do not believe this to be the problem however as PHP will typically report an ERROR if your script uses more than the 'memory_limit' set in the php.ini. The poster's next comment links to this page, http://forum.coppermine-gallery.net/index.php/topic,52152.0.html, which shows the error we should see if PHP's memory limit is reached.

I have played around with the random images, but, alas, still have the same problem when I click on some (but not all) of the thumbnails.

One such page, for example, is:  http://www.bark.ch/displayimage.php?album=random&cat=0&pos=-5769

Should I ask the MSP's to increase some more?  What about their point that PHP is not reporting an error?

Thanks again.
Craig Walsh
CPG Photo Gallery - www.bark.ch
Member of the Association of Photographers (AOP)

Nibbler

That's still very low. Default is 128M for recent versions of PHP.

Coppermine uses its own error handler.

Craig Walsh

Requst sent to the MSP's to please increase to 128M. 

I hope this does the trick.  I'm off to bed now (one of the many drawbacks of growing old) . . . so will need to wait until morning to see if it solves this frustrating problem.

Thanks again for all of your help, and the super-fast replies.  I'll let you know in the morning if it worked.
Craig Walsh
CPG Photo Gallery - www.bark.ch
Member of the Association of Photographers (AOP)

lolainslacks

I too am having this problem.

What are the MSP's?

And what should I do, please?  ???

Joachim Müller

Quote from: lolainslacks on April 23, 2008, 04:50:16 AM
I too am having this problem.
Start a thread of your own - don't hijack someone else's thread.

Quote from: lolainslacks on April 23, 2008, 04:50:16 AMWhat are the MSP's?
"MSP" can have many meanings (see http://en.wikipedia.org/wiki/MSP). In this case, Craig is refering to "managed service providers". In your case: your webhost.

Craig Walsh

I thought "MSP's" (in this case) were the mysterious server people...

The MSP's have, as suggested, increased the PHP memory limit to 128M.  I have just spent about five minutes trying to find an image that doesn't work (with either the mid-size image or the large image) and all seems to be fine.

The MSP's have, however, added this cautionary comment:

QuoteWe usually do not increase the limit this high as it can cause some performance issues on the server (in the event of memory intensive PHP scripts running).

As this is a dedicated server, I assume that the performance issues would just be on our server, and would not affect other customers on other servers.  So I guess it's just a matter of running with it and seeing if there are any other problems, with either Coppermine or any of our other websites.  If there are, I suppose we could scale back the PHP memory limit to somewhere between the 16M (where there were problems with the www.bark.ch gallery) and 128M (where things, at least so far, seem to be fine).

Nibbler, you're a star.  Thank you again for all of your help with this.
Craig Walsh
CPG Photo Gallery - www.bark.ch
Member of the Association of Photographers (AOP)

lolainslacks

Quote from: Joachim Müller on April 23, 2008, 07:51:33 AM
Start a thread of your own - don't hijack someone else's thread.

I didn't mean to hijack anyone else's threads. I thought that since my problem was the same asked here, that it should go in the same thread. There was no bad intention or hijacking meant. It could be also helpful to post here in case more users are having the same problem and couldn't make it work with the solution given above.

Joachim Müller

Your issue differs. As I said: start a thread of your own. Don't reply here. Period.