After uploading quite a lot of JPEG images (from 1 - 6 MB each) I suddenly had the following error. The page cannot be viewed anymore because the error stays.
Warning: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: in /home/robeco/domains/zomerconcerten-beeldbank.nl/public_html/gallery2/modules/gd/classes/GdFunctionality.class on line 268
Warning: imagecreatefromjpeg(): '/home/robeco/domains/zomerconcerten-beeldbank.nl/public_html/gallery2/g2data/albums/jaap_van_zweden/JvZ-01.jpg' is not a valid JPEG file in /home/robeco/domains/zomerconcerten-beeldbank.nl/public_html/gallery2/modules/gd/classes/GdFunctionality.class on line 268
Extra information: I had a look at the image JvZ-01.jpeg and there seems to be something wrong with this one (and the next one in the dir) because there is no preview in Windows also.
Error Detail -
Error (ERROR_UNSUPPORTED_FILE_TYPE)
in modules/gd/classes/GdFunctionality.class at line 232 (gallerystatus::error)
in modules/gd/classes/GdFunctionality.class at line 269 (gdfunctionality::checkresource)
in modules/gd/classes/GdToolkit.class at line 438 (gdfunctionality::imagecreatefromjpeg)
in modules/gd/classes/GdToolkit.class at line 147 (gdtoolkit::_getimageresource)
in modules/core/classes/GalleryDerivative.class at line 365 (gdtoolkit::performoperation)
in modules/core/classes/GalleryDerivativeImage.class at line 176 (galleryderivative::rebuildcache)
in modules/core/classes/helpers/GalleryDerivativeHelper_advanced.class at line 683 (galleryderivativeimage::rebuildcache)
in modules/core/classes/helpers/GalleryDerivativeHelper_advanced.class at line 661 (galleryderivativehelper_advanced::rebuildcache)
in modules/core/classes/GalleryCoreApi.class at line 705 (galleryderivativehelper_advanced::rebuildcache)
in modules/core/classes/GalleryLayout.class at line 578 (gallerycoreapi::rebuildderivativecache)
in layouts/matrix/layout.inc at line 266 (matrixlayout::loadlayouttemplate)
in layouts/matrix/layout.inc at line 150 (matrixlayout::_loadalbumtemplate)
in modules/core/ShowItem.inc at line 124 (matrixlayout::loadtemplate)
in modules/core/classes/GalleryView.class at line 246 (showitemview::loadtemplate)
in main.php at line 257 (showitemview::doloadtemplate)
in main.php at line 46
in main.php at line 39
System Information
Gallery version 2.0-alpha-4+
PHP version 4.3.10 apache
Webserver Apache/1.3.33 (Unix) mod_ssl/2.8.22 OpenSSL/0.9.7c PHP/4.3.10 mod_perl/1.29 FrontPage/5.0.2.2510
Database mysql 4.0.17-log
Toolkits Gd
Operating system FreeBSD s001.collesto.nl 5.2-RELEASE FreeBSD 5.2-RELEASE #0: Sun Jan 11 04:21:45 GMT 2004
:/usr/obj/usr/src/sys/GENERIC i386
Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Please help.
Posts: 7994
Can you provide us with a link to the broken image? I'll try to recreate the problem locally and fix it.
Posts: 13
Do you mean a link like http://www.zomerconcerten-beeldbank.nl/gallery2/g2data/albums/jaap_van_zweden/JvZ-01.jpg ??
The problem is that I cannot come onto the page were the album is, so i cannot delete the image or the whole album jaap_van_zweden (is only 1 broken image in it so that would be no problem. I don't know if I can remove it from the directory and what that does with the database. I reallly hope you can help me with this because we entered the recent days quite a lot of image and keywords.
The product by the way looks great.
Joop Schor
Posts: 7994
Thanks for the link. The image you provided is broken in some way; I can't view it in Firefox or handle it with GD. But the GD module wasn't properly handling it. I just committed a fix where now it will show up with the "broken" image and won't throw errors.
Posts: 13
Do i have to do something with that fix (and where is it), because i still cannot enter the page without errors?
http://www.zomerconcerten-beeldbank.nl/gallery2/main.php
page 3 of the albums cannot be entered
Posts: 32509
tip:
the image viewer irfanview always displays a message if something with an image is wrong, i.e. wrong file extensions (.jpg for .bmp, ...).
Posts: 13
Thanks for the tip. What i learned from this is always look at the images before uploading! In this case i got a dvd with images from someone and uploaded without looking before.
But my problem remains, because the fix (see post Jan 28, 2005 - 02:37 AM) provided by bharat didn't do the job. I still cannot enter page 3 of the album section. I really hope this problem can be solved.
Posts: 8601
jschor, did you update from CVS or get the most recent nightly snapshot? (see G2 FAQ if needed)
bharat, would you expect this fix to resolve the problem for an already-broken image? Or will it only help when you now add a bad image file?
Posts: 13
am working with the nightly snapshot from 170105 at the moment. I am not update from CVS because I am not known with that principle.
The main problem at the moment is to resolve the problem for the already broken image. This causes that i cannot view the 3rd (of 4) albumpages i have created up till now. The other pages i can view. The third page causes the errors. You can have a look at [url]www.zomerconcerten-beeldbank.nl/gallery2/main.php[/url] if you want and look at the 3rd page. Now it is not possible to remove this image because i cannot enter this page. Is there a way to remove it directly from the directory it is in or will this cause other problems (database??)? If the fix doesn't resolve the problem for the already broken image i would prefer not to upgrade at this moment because for the rest evertything works ok. Next thursday i have to show this testimplementation (part of a project) of G2 to one of my customers so i prefer to update after thursday. If the fix resolves the problem then ofcourse i will upgrade.
Posts: 7994
The fix will resolve your problem. But you have to get a new copy of the code -- I didn't automagically go and fix the copy on your server If you don't want to mess with CVS, upgrade to the latest nightly snapshot from here
Posts: 1
Hi
I have the same problem like jschor but Irfanview says that everything is fine with the pictures. Windows is fine with it too.
The Debug Output is as follows:
GdToolkit::performOperation(image/jpeg,thumbnail,/home/www/web108/files/g2data/albums/italien/italien07/DSC00016.JPG,/home/www/web108/files/g2data/cache/derivative/0/3/32.dat,150)
file_exists(/home/www/web108/files/g2data/albums/italien/italien07/DSC00016.JPG)
is_file(/home/www/web108/files/g2data/albums/italien/italien07/DSC00016.JPG)
is_readable(/home/www/web108/files/g2data/albums/italien/italien07/DSC00016.JPG)
realpath(/home/www/web108/html/gallery2/modules/core/classes/../../../)
realpath(/home/www/web108/html/gallery2/)
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
/home/www/web108/files/g2data/smarty/templates_c/%%234144764/%%3A^3A8^3A818B59%%theme.tpl.php
at line 69 (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 473 (GalleryTemplate::display)
in main.php at line 94
in main.php at line 83
copy(/home/www/web108/html/gallery2/modules/core/classes/../data/broken-image.gif,
/home/www/web108/files/g2data/cache/derivative/0/3/32.dat)
getParameter permissions.file for core plugin
getParameter permissions.directory for core plugin
file_exists(/home/www/web108/files/g2data/cache/module/_all/0/0/GalleryMimeTypeHelper_mimeData.inc)
file_exists(/home/www/web108/files/g2data/cache/derivative/0/3/32.dat)
filesize(/home/www/web108/files/g2data/cache/derivative/0/3/32.dat)
[...]
The link to the file: http://www.shdev.de/gallery2/main.php?g2_itemId=31&&g2_fromNavId=x9d998b98&g2_GALLERYSID=d13c703b4c3bb9e4b9fc5623065d8862
Its not only one file but almost all.
thanks
Posts: 8601
Activate imagemagick or netpbm toolkit and make it highest priority in Site Admin / toolkit priority. if you need further help, start a new topic in the support forums. please don't reopen topics that are years old, thanks.