Graphics Toolkits errors (NetPBM, ImageMagick)

robinbowes

Joined: 2002-09-20
Posts: 99
Posted: Wed, 2005-01-05 10:50

Hi,

I upgraded my G2 installation recently and none of my Graphics Toolkits now work.

When I try to activate NetPBM I get the following error:

 Error (ERROR_COLLISION, ERROR_UNKNOWN) : CRC mismatch: != 0, or Mime type mismatch: image/jpeg != image/jpeg

    * in modules/core/classes/helpers/GalleryToolkitHelper_medium.class at line 114 (gallerystatus::error)
    * in modules/core/classes/GalleryCoreApi.class at line 1686 (gallerytoolkithelper_medium::registeroperation)
    * in modules/netpbm/module.inc at line 262 (gallerycoreapi::registertoolkitoperation)
    * in modules/core/AdminModules.inc at line 108 (netpbmmodule::activate)
    * in main.php at line 147 (adminmodulescontroller::handlerequest)
    * in main.php at line 46
    * in main.php at line 39

System details:

 Gallery version  	 2.0-alpha-4+
PHP version 	4.3.10 apache2handler
Webserver 	Apache/2.0.52 (Fedora)
Database 	mysql 4.1.7-standard
Toolkits 	
Operating system 	Linux dude.robinbowes.com 2.6.9-1.724_FC3smp #1 SMP Sun Jan 2 15:56:53 EST 2005 i686
Browser 	Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

I get a similar error with ImageMagick.

Any suggestions?

R.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2005-01-05 20:48

you need to deactivate ALL toolkits and then reactivate them to get the newer signature for the scale operation.

 
robinbowes

Joined: 2002-09-20
Posts: 99
Posted: Thu, 2005-01-06 18:09
mindless wrote:
you need to deactivate ALL toolkits and then reactivate them to get the newer signature for the scale operation.

Hi,

I uninstalled all four graphic toolkits then re-installed the NetPBM toolkit. When I activated it I got the same error message:

 Error (ERROR_COLLISION, ERROR_UNKNOWN) : CRC mismatch: != 0, or Mime type mismatch: image/jpeg != image/jpeg

    * in modules/core/classes/helpers/GalleryToolkitHelper_medium.class at line 114 (gallerystatus::error)
    * in modules/core/classes/GalleryCoreApi.class at line 1686 (gallerytoolkithelper_medium::registeroperation)
    * in modules/netpbm/module.inc at line 262 (gallerycoreapi::registertoolkitoperation)
    * in modules/core/AdminModules.inc at line 108 (netpbmmodule::activate)
    * in main.php at line 147 (adminmodulescontroller::handlerequest)
    * in main.php at line 46
    * in main.php at line 39

Ant other suggestions?

R.

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Fri, 2005-01-07 00:57

Have you tried updating to latest CVS or nightly build?

You could also try dropping / re-creating your DB and rm -Rf /g2data/*

 
virshu
virshu's picture

Joined: 2003-09-13
Posts: 314
Posted: Fri, 2005-01-07 01:29

robinbowes, once you remove all toolkits, your toolkit operation table (g2_tkoperatnmap) should be empty. If it's not - you can clear it (if you are OK about going to the database). If not - your best bet is to clear the database and reinstall, as fryfrog suggests...

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2005-01-07 01:48

After you deactivate all your toolkits, that table should be empty. If it isn't, tell us what's in the table! Maybe you'll find that there are some toolkits you didn't deactivate by looking in that table.

 
robinbowes

Joined: 2002-09-20
Posts: 99
Posted: Fri, 2005-01-07 09:15
bharat wrote:
After you deactivate all your toolkits, that table should be empty. If it isn't, tell us what's in the table! Maybe you'll find that there are some toolkits you didn't deactivate by looking in that table.

Hi,

The table is not empty. It contains the following row:

"convert-to-image/jpeg","","image/jpeg","Convert to a JPEG"

I deleted that row and the NetPBM toolkit has now installed correctly.

Thanks for your help.

R.

 
royby

Joined: 2002-12-03
Posts: 17
Posted: Wed, 2005-09-14 09:35

I followed all of the above steps but now cannot install any of the graphics toolkits. I get the following errors, any help appreciated
cheers

Error (ERROR_STORAGE_FAILURE)

* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1238 (gallerystatus::error)
* in modules/core/classes/GalleryStorage.class at line 294 (mysqldatabasestorage::addmapentry)
* in modules/core/classes/interfaces/GalleryPluginParameterMap.inc at line 98 (gallerystorage::addmapentry)
* in modules/core/classes/helpers/GalleryPluginHelper_medium.class at line 408 (gallerypluginparametermap::addmapentry)
* in modules/core/classes/helpers/GalleryPluginHelper_medium.class at line 353 (gallerypluginhelper_medium::_addparameter)
* in modules/core/classes/GalleryCoreApi.class at line 387 (gallerypluginhelper_medium::setparameter)
* in modules/core/classes/GalleryPlugin.class at line 437 (gallerycoreapi::setpluginparameter)
* in modules/netpbm/module.inc at line 61 (netpbmmodule::setparameter)
* in modules/core/classes/GalleryModule.class at line 158 (netpbmmodule::upgrade)
* in modules/core/AdminModules.inc at line 68 (netpbmmodule::installorupgrade)
* in main.php at line 174 (adminmodulescontroller::handlerequest)
* in main.php at line 87
* in main.php at line 80

System Information
Gallery version 2.0
PHP version 4.3.11 apache
Webserver Apache/1.3.33 (Unix) Chili!Soft-ASP/3.6.2 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.11 FrontPage/5.0.2.2635 mod_ssl/2.8.22 OpenSSL/0.9.6b
Database mysql 4.0.25-standard
Toolkits
Operating system Linux cp1.hostingshop.com.au 2.4.20-28.7smp #1 SMP Thu Dec 18 11:18:31 EST 2003 i686
Browser Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.9) Gecko/20050711 Firefox/1.0.5

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-09-14 16:50

please activate buffered debug mode and try again. you should get the same error at the top of the page, but much more debug output which will help us identify the problem.

 
royby

Joined: 2002-12-03
Posts: 17
Posted: Thu, 2005-09-15 03:47

ok thanks Valiant, where do I do that again?

cheers

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2005-09-15 04:04

config.php

 
royby

Joined: 2002-12-03
Posts: 17
Posted: Thu, 2005-09-15 05:10

OK thanks nivekiam, i've done that. Do you want the results from the page in the browser or the Smarty Debug Console or both?

Cheers

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2005-09-15 06:13

I believe just the stuff in the browser. Since you can only attach files to the first post of a topic it would probably be best if you could copy and paste that into a zip file or text file and link that from your site for valiant or another dev to look at.

 
royby

Joined: 2002-12-03
Posts: 17
Posted: Thu, 2005-09-15 06:21

ok thanks nivekiam will do

 
royby

Joined: 2002-12-03
Posts: 17
Posted: Thu, 2005-09-15 07:01

I have placed the debug report as a txt file here:
http://www.royby.com/gallery_error.txt
however, the text hasn't wrapped so be aware there are some long lines of code

cheers

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-09-15 13:42
Quote:
Upgrade (or install) gd module setParameter jpegQuality for gd plugin mysql error: [1062: Duplicate entry 'module-gd-0-jpegQuality' for key 1] in EXECUTE("INSERT INTO g2_PluginParameterMap (g_pluginType, g_pluginId, g_itemId, g_parameterName, g_parameterValue) VALUES ('module','gd',0,'jpegQuality','75')") (mysql): INSERT INTO g2_PluginParameterMap (g_pluginType, g_pluginId, g_itemId, g_parameterName, g_parameterValue) VALUES ('module','gd',0,'jpegQuality','75') 1062: Duplicate entry 'module-gd-0-jpegQuality' for key 1

please uninstall (not just deactivate) your GD module. then install and activate it again.

 
royby

Joined: 2002-12-03
Posts: 17
Posted: Fri, 2005-09-16 01:04

thanks valiant

I uninstalled gd by deleting the folder and then reuploading it into the modules folder, but the same errors have occured when I tried to install it through site admin. Is there another way to do an uninstall and install perhaps?

I am getting many errors on other functions as well and I'm beginning to think that perhaps I should delete gallery 2 entirely and try uploading again, perhaps by a different method this time. First time around I uploaded the zipped folder and unzipped it on the server as advised in the README.html file. Are there known problems with this method and should I try one of the other approaches maybe?

thanks for your helpful advice

cheers

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-09-16 06:35

i've never said you should delete the folder or something like that. deleting a folder in g2 is a bad idea.

what i meant was:
in site admin -> modules, click "uninstall" next to GD. if the only option you see is "install", then something is wrong and you'll have to edit the database manually. delete all rows from g2_PluginParameterMap where g_PluginId = gd

@uploading gallery2:
you can verify whether your current gallery2 files are ok by browsing to yourgalleryurl/upgrade/index.php and then go to the system checks step in the upgrader.
any warning?

 
royby

Joined: 2002-12-03
Posts: 17
Posted: Fri, 2005-09-16 07:05

thanks valiant

i've done that with the database and have been able to install and activate gd successfully. should I do the same things with the other graphics toolkits if I want to use them?

There are no warnings in the upgader system checks, everything is succesfull.

thanks once again - cheers

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-09-16 08:02

if you have the same issues with the other toolkits, i guess you have to.
maybe you'll end up with issues because you should also have emptied the toolkit db tables. we'll see.