[SOLVED] Some thumbnails are not uploading. Some thumbnails are broken, but the photos are normal.

battledingo
battledingo's picture

Joined: 2006-08-25
Posts: 39
Posted: Wed, 2013-07-10 03:42

Hi

I have some thumbnails not loading and showing broken thumbnails on upload. I have recently upgraded gallery to 2.3.2.

I have tried:

+ Uninstalling/reinstalling Imagemagic.

+ Tested imagicmagic (is says all is ok)

+ Deleting templete cache.

+ When I rebuild thumbnails there are rebuilt. However I would like to fix this error so I don't have to rebuild thumbnails after each upload.

+ Tried to install another graphic toolkit... Gd failed with the error (I have updated it to the latest software version)
"Failed. This GD version is too old and is not supported by this module! Please upgrade your PHP installation to include the latest GD version."

+ Tried to install another graphic toolkit..NetPBM. I have to install NetPBM on the server & couldn't find the install package for Linux. Gave up looking for it and searched the forums for more answers.

+ Used Gallery Remote and Upload applet, both produce the random broken thumbnails.

+ Someone solved the problem in the forums by deleting caches in maintenance at www.yoursite.com/gallery/lib/support/index.php (not sure if it is the same clearing of the cache found on the admin panel). However I just got a bunch of errors after login. Probably unrelated to my problem, but here is the error message:

Quote:
Strict Standards: Non-static method GallerySetupUtilities::startSession() should not be called statically in /public_html/gallery/lib/support/security.inc on line 33

Strict Standards: Non-static method GalleryUtilities::getRequestVariablesNoPrefix() should not be called statically in /public_html/gallery/lib/support/GallerySetupUtilities.class on line 320

Strict Standards: Non-static method GalleryUtilities::_getRequestVariable() should not be called statically in /public_html/gallery/modules/core/classes/GalleryUtilities.class on line 289

Strict Standards: Non-static method GalleryUtilities::_internalGetRequestVariable() should not be called statically in /public_html/gallery/modules/core/classes/GalleryUtilities.class on line 875

Strict Standards: Non-static method GalleryUtilities::_internalGetRequestVariable() should not be called statically in /public_html/gallery/modules/core/classes/GalleryUtilities.class on line 879

Strict Standards: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /public_html/gallery/modules/core/classes/GalleryUtilities.class on line 293

Strict Standards: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /public_html/gallery/modules/core/classes/GalleryUtilities.class on line 708

Strict Standards: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /public_html/gallery/modules/core/classes/GalleryUtilities.class on line 714

Strict Standards: Non-static method GallerySetupUtilities::areCookiesSupported() should not be called statically in /public_html/gallery/lib/support/GallerySetupUtilities.class on line 326

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /public_html/gallery/lib/support/security.inc:33) in /public_html/gallery/lib/support/GallerySetupUtilities.class on line 357

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /public_html/gallery/lib/support/security.inc:33) in /public_html/gallery/lib/support/GallerySetupUtilities.class on line 357

Strict Standards: Non-static method GallerySession::getRemoteIdentifier() should not be called statically in /public_html/gallery/lib/support/GallerySetupUtilities.class on line 365

Strict Standards: Non-static method GalleryUtilities::getServerVar() should not be called statically in /public_html/gallery/modules/core/classes/GallerySession.class on line 1266

Strict Standards: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /public_html/gallery/modules/core/classes/GalleryUtilities.class on line 1408

Strict Standards: Non-static method GalleryUtilities::getRemoteHostAddress() should not be called statically in /public_html/gallery/modules/core/classes/GallerySession.class on line 1267

Strict Standards: Non-static method GalleryUtilities::isTrustedProxy() should not be called statically in /public_html/gallery/modules/core/classes/GalleryUtilities.class on line 1008

Strict Standards: Non-static method GallerySetupUtilities::getConfigDir() should not be called statically in /public_html/gallery/lib/support/GallerySetupUtilities.class on line 367

Strict Standards: Non-static method GallerySession::compareIdentifiers() should not be called statically in /public_html/gallery/lib/support/GallerySetupUtilities.class on line 370

Strict Standards: Non-static method GallerySetupUtilities::getGalleryConfig() should not be called statically in /public_html/gallery/lib/support/security.inc on line 36

Strict Standards: Non-static method GallerySetupUtilities::getConfigDir() should not be called statically in /public_html/gallery/lib/support/GallerySetupUtilities.class on line 244

:) Cheers


Gallery version = 2.3.2 core 1.3.0.2
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.4.16 cgi-fcgi
Webserver = Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Database = mysqli 5.5.30, lock.system=flock
Toolkits = Thumbnail, LinkItemToolkit, ImageMagick
Acceleration = none/1800, none/1800
Operating system = Linux ld128.inmotionhosting.com 2.6.32-358.6.2.el6.bl1.0.1_1.x86_64 #1 SMP Thu May 30 20:45:26 MDT 2013 x86_64
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0
Rows in GalleryAccessMap table = 1687
Rows in GalleryAccessSubscriberMap table = 14929
Rows in GalleryUser table = 225
Rows in GalleryItem table = 14925
Rows in GalleryAlbumItem table = 253
Rows in GalleryCacheMap table = 0

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Wed, 2013-07-10 16:37

Ask your host why they have left PHP's E_STRICT setting on.

The host should know that this should not be set for production servers.

--
dakanji.com

 
battledingo
battledingo's picture

Joined: 2006-08-25
Posts: 39
Posted: Fri, 2013-07-12 04:50

Hi Dayo

Thanks for your quick reply. Inmotion hosting changed the php.ini file to read

Quote:
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED

I was able to access the gallery/lib/support/index.php and wipe the cache, unfortunately I still have the same problem of broken thumbnails. Thanks for solving the error of being unable to access the maintenance page.

I read your post yesterday that you had the same problem but with random broken thumbnails appearing after the page is refreshed. Would your module/script solve my problem or should I just downgrade gallery to a version that didn't have this problem?

reference: http://galleryproject.org/node/111794

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Thu, 2013-07-11 22:11

What your host has just set is:

Show E_ALL warnings
Ignore E_NOTICE warnings
Ignore E_DEPRECATED warnings

Since E_STRICT was included in E_ALL as from PHP 5.4, their setting is no good with respect to disabling E_STRICT warnings.
What is needed for PHP 5.4 and above is: error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT

It seems your host has not kept themselves up to date on the requirements of a key server side software.
Ask them to read up on: http://php.net/manual/en/errorfunc.constants.php

--
dakanji.com

 
battledingo
battledingo's picture

Joined: 2006-08-25
Posts: 39
Posted: Fri, 2013-07-12 04:41

Thanks for your help Dayo. Unfortunately that didn't fix the problem of broken thumbnails.

I spent yesterday trying to work out the problem & think I might just have to revert back to gallery 2.2.

I really like your photos at http://www.dakanji.com/ Great documentary style photography. Your work reminds me of the magnum photographers: http://www.magnumphotos.com

Have a great day. :)

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Fri, 2013-07-12 09:30

Thanks for viewing my site.

Note that G2.2 will not work with PHP 5.4 (or, more accurately, will randomly crash depending on a number of things).

Whatever the case, the answer is most definitely not a downgrade to G2.2 and that is probably about the worst possible decision you could make in these circumstances.

The broken thumbs issue is either a resource (host server overloaded) or toolkit issue.

Since you say ImageMagick is installed fine, just leave it alone. Most probably your host is overloaded.

Do make sure you haven't selected the option to only create thumbs when first viewed.

--
dakanji.com

 
battledingo
battledingo's picture

Joined: 2006-08-25
Posts: 39
Posted: Mon, 2013-07-15 09:46

Thanks the advice and time. I will keep trying to find an answer without downgrading gallery. Will post me answer here.

In the meantime I will fix the proplem by rebuilding thumbnails after each upload.

cheers

 
battledingo
battledingo's picture

Joined: 2006-08-25
Posts: 39
Posted: Sat, 2013-07-20 00:59

I think the problem is now solved, thanks to Dayo & Suprsidr for their advice.

Here is how I fixed it:

+ Reinstalled Gallery 2.3.2 and didn't activate any extra plugins.
+ Went into Cpanel & repaired the database (back it up first).
+ Went into Gallery, Admin, Maintenance and did the following: Delete database cache, Delete template cache and Build all thumbnails/resizes.

BINGO no more problem. I suspect that all was repaired with the reinstall, but have inclused all my steps just in case.

Hope this helps someone else.