Photos display as broken image for all images in all sizes
|
sean986@hotmail.com
Joined: 2008-11-08
Posts: 9 |
Posted: Sat, 2008-11-08 23:39
|
|
I have been using gallery2 for several years with any problems, but today none of the images are displaying, they are all just showing a "broken image" placeholder. I haven't made any changes to the gallery. None of the pages are showing any error messages. I also have a problem where occasionally gallery pages don't return i.e. response code of zero. Any suggestions would be greatly appreciated. The gallery is here: http://www.kesu.org.uk/Gallery2/main.php Phpinfo: http://www.kesu.org.uk/sln-php-info.php G2/system information: |
|

Posts: 16503
In the software world something doesn't just sudden stop working. Ask your host what they changed.
With just GD running, I'd try to get the memory limit for PHP up to at least 24MB and better if you can get it to 32MB.
FAQ: PHP memory_limit - Why do I get the error Allowed memory size of Xxx bytes exhausted?
And you can't use NetPBM or ImageMagick because your host has disabled exec.
First step if you want to troubleshoot it.
I'd check the permissions on g2data and sub-directories. Are you able to add new photos or create new albums?
Put Gallery into debug mode:
FAQ: How to set/use Gallery in debug mode?
Try rebuilding the thumbnails and resized versions for a single album.
Copy and paste debug output into a text file, zip the file and attach to this thread.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 16503
Edit, oh and once everything is working, I'd take a look at upgrading to 2.3 since several security holes have been fixed since 2.2.2
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 9
Thanks for getting back to me with so many suggestions.
In the software world something doesn't just sudden stop working. Ask your host what they changed.
Thats exactly what I thought but when I contacted them I got the fairly generic response:
Thank you for your query
This information is not generated by anything that we control. It looks like it's generated by the contents you are hosting.
I am sorry but we are unable to help you with the contents or scripting of your website.
Please check your contents to establish what causes this.
Kind Regards
I can't find anyway to prove they have changed anything.
With just GD running, I'd try to get the memory limit for PHP up to at least 24MB and better if you can get it to 32MB.
I've added ini_set("memory_limit","32M"); to main.php
I'd check the permissions on g2data and sub-directories.
my g2data has a chmod value of 707
subdirectories have a value of 757
Are you able to add new photos or create new albums?
Yes
Put Gallery into debug mode:
Done
Try rebuilding the thumbnails and resized versions for a single album.
Copy and paste debug output into a text file, zip the file and attach to this thread
See attached, there are a lot of errors like this:
Error (ERROR_UNSUPPORTED_FILE_TYPE, ERROR_TOOLKIT_FAILURE)in
modules/gd/classes/GdFunctionality.class at line 216
(GalleryCoreApi::error)
in modules/gd/classes/GdFunctionality.class at line 258
(GdFunctionality::checkResource)
in modules/gd/classes/GdToolkit.class at line 449
(GdFunctionality::imageCreateFromJpeg)
in modules/gd/classes/GdToolkit.class at line 128
(GdToolkit::_getImageResource)
in modules/core/classes/GalleryDerivative.class at line 450
(GdToolkit::performOperation)
in modules/core/classes/GalleryDerivative.class at line 275
(GalleryDerivative::_rebuildCache)
in modules/core/classes/GalleryDerivativeImage.class at line
153 (GalleryDerivative::rebuildCache)
in
modules/core/classes/helpers/GalleryDerivativeHelper_advanced.class at
line 839 (GalleryDerivativeImage::rebuildCache)
in modules/core/classes/GalleryCoreApi.class at line 914
(GalleryDerivativeHelper_advanced::rebuildCache)
in
modules/core/classes/helpers/GalleryDerivativeHelper_simple.class at
line 49 (GalleryCoreApi::rebuildDerivativeCache)
in modules/core/classes/GalleryCoreApi.class at line 901
(GalleryDerivativeHelper_simple::rebuildCacheIfNotCurrent)
in modules/core/classes/BuildDerivativesTask.class at line
99 (GalleryCoreApi::rebuildDerivativeCacheIfNotCurrent)
in modules/core/AdminMaintenance.inc at line 90
(BuildDerivativesTask::run)
in ??? at line 0 (AdminMaintenanceController::runTask)
in modules/core/classes/GalleryTemplateAdapter.class at line
915
in
g2data/smarty/templates_c/%%1576740994/%%3A^3A8^3A818B59%%theme.tpl.php
at line 109 (GalleryTemplateAdapter::trailer)
in lib/smarty/Smarty.class.php at line 1258
in modules/core/classes/GallerySmarty.class at line 61
(Smarty::fetch)
in modules/core/classes/GalleryTemplate.class at line 209
(GallerySmarty::fetch)
in main.php at line 478 (GalleryTemplate::display)
in main.php at line 99
in main.php at line 88
Posts: 16503
Well if I'm reading everything correctly this is where I think your albums directory should be:
http://www.kesu.org.uk/Gallery2/g2data/albums/
or here on the server: /home/fhlinux169/k/kesu.org.uk/user/htdocs/Gallery2/g2data/albums/
However, I get a 404 error when trying to access that, try changing g2data to 777 and see if that changes things.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 9
The albums directory is:
http://www.kesu.org.uk/Gallery2/g2data/albums/
Sorry I renamed it in the log to try and make it easier to read
Posts: 16503
I see. I edited your post to remove that direct link to g2data as we suggest it's not even webaccessible.
I'm getting a 500 internal server error on that directory. Which shouldn't matter since it again, shouldn't even be webaccessible and tested on my g2data and edited my .htaccess file such that it would generate a 500 internal server error if accessed via the web and nothing happened.
1) Can you take a look at your error logs on the server to see what pops in there when you try to access that directory?
2) Did you try changing the permissions of your g2data directory to 777? If so, did that make a difference, if not, can you try it?
3) Can you remove/rename your .htaccess file that in your g2data directory and try browsing the albums directory your self? You may need to enable showing indexes. Try opening some of the .jpg images that are below your albums directory. I want to make sure these haven't become corrupt for some reason.
As you can see from the debug info you posted above, GD doesn't recognize the files.
Also, just for grins as I'm not seeing any errors to indicate this, could you try disabling the EXIF module?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 9
Thanks for another quick response
Can you take a look at your error logs on the server to see what pops in there when you try to access that directory?
/home/fhlinux169/k/kesu.org.uk/user/htdocs/Gallery2/g2data/.htaccess: DirectoryIndex not allowed here
Did you try changing the permissions of your g2data directory to 777? If so, did that make a difference, if not, can you try it?
I've tried that but it didnt seem to make any difference
Can you remove/rename your .htaccess file that in your g2data directory and try browsing the albums directory your self? You may need to enable showing indexes. Try opening some of the .jpg images that are below your albums directory. I want to make sure these haven't become corrupt for some reason.
I can open the files by browsing to the folder through ftp and the images appear fine.
could you try disabling the EXIF module
Deactived this but doesnt seem to have made any difference
Posts: 9
I've been looking at my php error log and yesterday and today I'm had about a hundred of these errors:
[10-Nov-2008 19:41:04] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 10204287 bytes) in /home/fhlinux169/k/kesu.org.uk/user/htdocs/Gallery2/modules/core/classes/GallerySession.class on line 974
Which doesnt seem to make sense; how can you exhaust 32MB by allocating 9MB.
I also found this error:
[07-Nov-2008 20:16:07] PHP Warning: mysqli_real_connect() [<a href='function.mysqli-real-connect'>function.mysqli-real-connect</a>]: (08004/1040): Too many connections in /home/fhlinux169/k/kesu.org.uk/user/htdocs/Gallery2/lib/adodb/drivers/adodb-mysqli.inc.php on line 108
Posts: 16503
I don't know about the memory error, but I've seen that with GD. Do you need the EXIF plugin installed? Try disabling that and see if that helps.
As for the too many connections to mysql, talk to your host. Some hosts have ridiculous limitations. But it also depends on how high a traffic site you have. I know for a fact, that on a low traffic site, Gallery can live within pretty meager limitations:
http://www.pair.com/policies/dbresource.html
Make sure you are taking advantage of G2's caching feature and set the performance settings under Site Admin > Performance.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 25961
that is for sure:re: http://www.pair.com/policies/dbresource.html
I guess you can't run gallery on that host with this limitation:
Does "view counts" count as a 'hit counter'? You can't even log browser/page info, that is ridiculous.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 16503
a bit off topic here, but....
Sure you can run Gallery at Pair, better than most hosts. I've ran Gallery there for years
Technically I think Gallery's "view counts" might count, but they haven't said anything to me in the years I've been running Gallery nor to the 100s of others that run Gallery on Pair's servers. On a high traffic site that's probably a feature you should have disabled anyway as it's the only database modification on page views with Gallery. I don't have anywhere near any high traffic site though. In the 1-1/2 years I've had Gallery running on my "high traffic" site (about 15-20 visitors per day) I've accumulated about 13,000 views in Gallery. So I might be flying under the radar.
They mean actual hit counters. Someone being obviously stupid and abusive with system resources. Page hits can and should be counted in your access logs, along with browser and page info
or use Google Analytics. Thus my posts years ago here about disabling that feature.
Pair is one of the few hosts that really, really have their act together. Example, they moved my account and all my sites to a new server when I added an SSL cert in 5 minutes. Amount of downtime for me having to "fix" things or reconfigure stuff? ZERO.
They've swapped out the entire chassis of the server I've been on in 10 minutes. Anything break? Nope, nothing at all. Hard drive failure? Downtime, 10 minutes. Nothing broken.
OS upgrade, done in 15 minutes. Database server upgrade, done. PHP Upgrade, done. Did I notice anything when any of this happened? Nope, nada, nothing at all. They really know the software they run, no Cpanel, fantastico crap or anything like that. No click and play crap on their servers where they install a package that they hope manages the server for them, ala Cpanel, Plesk, etc. So many of those hosts that run that software don't even know how to run their servers, they just use some point-n-click software to manage their servers and when something really breaks they are lost.
I can count several (5? 10?) instances in the last week where we've had people complain on these forums about their site suddenly stop working. Guess what people, talk to your host, they did change something, even if they claim they didn't, they did, or they just have a flaky, unreliable setup. In the software world, if something is working it does not suddenly stop working unless there is some limitation, known or unknown, programmed into the software.
Yes, a few customers have had bumps in the road during upgrades where the software they were/are running on their site broke because it was relying on something in the old version of PHP or MySQL or Apache or FreeBSD or something else. But those are far and few between. They also notify all of their customers about pending upgrades and just don't do it. They spend months planning upgrades and just don't do it. They roll the upgrades out in phases across their 1000s of servers in their own datacenter and don't just push a button and hope it all works
They are by far and above one of the best hosts out there. Cheapest? Not even close. But you're not going to find much better customer service anywhere.
http://www.pair.com/about/stats.html
They host Tom's Hardware and many other really large sites. As well as host mirrors for many open source projects (FreeBSD, OpenOffice.org, Apache, MySQL, etc http://mirrors.pair.com/pair/mirrors/. I've never seen a site they host that gets linked to from Slashdot or Digg actually go down. They somehow seem to stay up and running even those driven by PHP with a database backend. Granted I don't know if those are typically on a dedicated server or a shared server...
I'm not trying to sell you or anyone on them, you get what you pay for and I pay for service and uptime
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 25961
nivekiam,
Great to here you like them. Sounds like they are good. like you said; "you get what you pay for". If anybody asks I will point them to your post.
</off topic>
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 9
Sounds like pair are an excellent host for running gallery, I am with Streamline .net who have been very good until recently when I started having these problems with Gallery2. As they deny making any changes, I have no way of proving they have changed anything there is not much I can do.
EXIF is disabled.
Under Performance I have Full Acceration Expires after 1 hour.
The 'Too many connections' error hasnt recurred but I'm still getting the same memory error many times a day:
[15-Nov-2008 17:35:20] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 10203183 bytes) in /home/fhlinux169/k/kesu.org.uk/user/htdocs/Gallery2/modules/core/classes/GallerySession.class on line 974
Posts: 16503
My only suggestion for the memory error is:
-- increase the available memory limit to at least 32MB since you can only use GD
-- ask your host to allow you to use the exec function and get ImageMagick or NetPBM working and uninstall GD
-- find a decent host
They may not have changed anything other than added (overloaded) accounts on your server and that's tipped the scales over on available system resources.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 9
increase the available memory limit to at least 32MB since you can only use GD
I've put it up from 32MB to 64MB
ask your host to allow you to use the exec function and get ImageMagick or NetPBM working and uninstall GD
I've asked, I'll see what the response is, I suspect it will be no.
Posts: 16503
Are you changing that setting your Gallery2 directory? Looking at your phpinfo file that's at the root of your site, your memory limit is still at 20MB. Create a phpinfo file in your Gallery2 directory or go to Gallery2/lib/support and check the phpinfo file there and see if your setting really changed to 32MB or 64MB.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 9
Well spotted, you are correct in Gallery2/lib/support/index.php?phpinfo the memory_limit is 20M 20M.
I thought I'd been changing it by adding ini_set("memory_limit","64M"); to the php tag of my main.php. This was specified in this page: http://codex.gallery2.org/Gallery2:FAQ#PHP_memory_limit_-_Why_do_I_get_the_error_Allowed_memory_size_of_Xxx_bytes_exhausted.3F
When I tried to use an htaccess file to increase the memory limit I got the error:
/home/fhlinux169/k/kesu.org.uk/user/htdocs/Gallery2/.htaccess: Invalid command 'php_value', perhaps mis-spelled or defined by a module not included in the server configuration
Am I doing something silly here? is there an better way to change the memory limit?
Posts: 16503
Looks like your host has restricted you from being able to make those changes.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 9
I'm assuming that I have got to the point where I have too many photos for the memory allowance of my account, I will create a new gallery and put the only most recent photos into it to see if that resolves the problem.
Thank you for all your help