Open jspencer177 opened 5 years ago
I have seen similar problems before, but without solution. It's not any bug in phpThumb per se, but seems to be related to server resources (too many thumbnails processed at once lead to the occasional timeout).
Unfortunately I don't have any particular solution to offer. Perhaps another user who has experienced this problem can offer other suggestions.
I tried adding this line after the phpThumb call: time_nanosleep(0, 070000000); in an attempt to give the system time to pull itself together between each image construction.
It increased the time it took to start showing the images but still came up with several broken ones. So no really noticeable improvement.
Would there be any advantage to using phpThumb.php rather than phpThumbURL?
I am using a page that I have used in the past (this is the site of an art organization and they have various shows that repeat each year; this is probably the third year on this show). In the past, all the images displayed without a problem. This year, I'm getting occasional broken images and I don't see any pattern to it.
For the purpose of this question, I excerpted the phpThumb code since the rest of the code was not relevant to the problem. This is the URL of the page in question:
https://newtonartassociation.com/membership/admin/mb_test.php
This is the phpThumb code on that page:
You should get a fairly lengthy column of 150px wide images. It looks fine until you start scrolling down and then you start seeing broken images. The broken images are more numerous as you get further down the column, and near the bottom there are more broken ones that unbroken ones. If you right-click on a broken image, you can look at it in a new tab (Chrome) or reload it (Firefox) and then if you go back to the original page the reloaded image is there. But if you reload the entire page (especially with a CTRL-reload) the broken ones show up again. But note that the ones that are broken are not always the same ones.
Also note that Firefox shows many more broken images than Chrome.
I have tried several different approaches - I changed the PHP version (5.6 and 7.0 produce the same results). I got the latest (development) version of phpThumb. Nothing seems to make much of a difference.
I hope you can make a suggestion - I have a client who is getting impatient.
I enabled debugging and got this: