Upload error, Return Value 126, convert program said db_input.php Line 402 Upload error, Return Value 126, convert program said db_input.php Line 402
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Upload error, Return Value 126, convert program said db_input.php Line 402

Started by wunderbunny, March 09, 2008, 02:12:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wunderbunny

I installed Coppermine Gallery yesterday using Fantastico Deluxe.  Imagemagick was already installed in my web space.  When I attempted to upload a file from my computer (via "upload files" button), I got the message (below).  I cannot find a db_input.php file.  I have a database called mattyorg_copp1.  There is a user called mattyorg_copp1 with all privileges assigned to it.  The input file is 100x100px.  If you want the debug script, let me know.  Thanks.



The file 'albums/userpics/Red_Stitched-01~0.jpg' can't be inserted in the album

Error executing ImageMagick - Return value: 126

Cmd line :
/usr/bin/mogrify/convert -quality 80 -geometry 80x80


The convert program said:


File: /home/mattyorg/public_html/gallery/db_input.php - Line: 402

SaWey

Installations done by fantastico etc. are not supported here, as they have crappy auto-installers.
You should try and do a manual install, not that hard.

Nibbler


wunderbunny

I downloaded the package and installed it manually.  When I attempted to upload a file (image Magick path = /usr/bin/mogrify/, I get the error:

The file 'albums/userpics/10001/Red_oxfordfalls23dec2007072ryu.jpg' can't be inserted in the album

Error executing ImageMagick - Return value: 126



I changed the path to /usr/bin/ and got this error:

The file 'albums/userpics/10001/Red_oxfordfalls23dec2007072ryu.jpg' can't be inserted in the album

Error executing ImageMagick - Return value: 1



Interestingly, the install process would not work unless I used /usr/bin/ as the path for Image Magick convert.  It would not recognise /usr/bin/mogrify.  I did not note the exact wording.

Joachim Müller

You can't install ImageMagick when you're webhosted and the server isn't yours to administer. If you can't get ImageMagick to work, use GD2 instead if this is available on your server.

wunderbunny

Thanks for the explanation.  My web host re-installed ImageMagick (server-wide).  I tried to upload the files again and got Return Value:  1.  See below.  Is Return Value 1 a generic error code?

My web host person aked if I could show him the script so that he can have a look at the mod_sec rules which are in place for security.  Which file contains this information?


I also followed your tip to install Coppermine manually.  The following message resulted when I tried to upload a file from the manual installation:

The file 'albums/userpics/10001/barbara.jpg' can't be inserted in the album

Error executing ImageMagick - Return value: 1

Cmd line :
/usr/local/bin/convert -quality 80 -antialias -geometry 100x50


The convert program said:


File: /home/mattyorg/public_html/manual_coppermine/db_input.php - Line: 402

SaWey

coppermine doesn't alter any mod_sec values, so this is not cpg related.
You might want to try to disable that mod by adding the following lines to your .htaccess:


SecFilterEngine Off
SecFilterScanPOST Off

wunderbunny

I updated .htaaccess and htaccess.txt because I was not sure which one I should update.  The file is in my public_html directory.  It still gives me the same error (below).  I even tried copying these files to the Coppermine subdirectory.  That did not work either.

The file 'albums/userpics/10001/powered-mysql.gif' can't be inserted in the album

Error executing ImageMagick - Return value: 1

Cmd line :
/usr/local/bin/convert -quality 80 -antialias -geometry 57x20


The convert program said:


File: /home/mattyorg/public_html/manual_coppermine/db_input.php - Line: 402



Thanks.

Joachim Müller


wunderbunny

GD2 works, but I get a new problem.  I uploaded two files with GD2.  After the first file was uploaded, I noticed the album list did not show the thumbnail.  The screen first loads with a square shape for the thumbnail.  Then the square shape disappears and I get a link with the file name.  No thumbnail.

After I read your last suggestion, I went back to the screen and noticed the thumbnail appeared in the album list!  I uploaded another file (with GD2 as the thumbnail image maker.  ImageMagick never works.)  The second image appeared in the list.

Then something strange happened.

I logged off.  I logged back in again.  I have the most powerful administrator account.

The album list no longer shows the thumbnails.  Again, the screen first loads with the square shapes.  Then they disappear and become text links.

I am really puzzled about how the thumbnails appear and disappear like this.  I would be happy to use GD2 if I can get the thumbnail screen (with the filmstrip graphic) to reappear.

Thanks.

Joachim Müller

Leave your gallery set to "GD2" as method for resizing images. Then do exactly as suggested in the docs, sections "upload troubleshooting" and "asking for support on upload issues". Review phpinfo as well wether you have GD2 available.

wunderbunny

As suggested, I changed the upload settings and set debug mode on.  I created a testuser (password california). 

I checked the installed of installed PERL modules.  I have:
GD (2.35)
GD::Graph (1.44)   GD::Text (0.86)



The following settings are still in my .htaccess file in the www/gallery/ folder (from earlier advice).
SecFilterEngine Off
SecFilterScanPOST Off


I don't know where to find the php.ini file to check settings.

Permissions for folders albums, albums/edit, albums/userpics is 755.



URL of web site:  http://mattcorby.org/gallery

This is the one which I manually installed (not the fantastico installation).

Last night the the thumbnails were visible and then they disappeared again this morning.

Thanks.

Joachim Müller

http uploads work as expected - see http://mattcorby.org/gallery/displayimage.php?pos=-3
If they exist at one time and then magically "disappear", it seems that your webhost is running a cron job that deletes the files. Ask them about this.

wunderbunny

I noticed something.  If I type http://mattcorby.org/gallery, I see the thumbnails.

However, I cannot see the thumbnails if I use http://gallery.mattcorby.org.

http://gallery.mattcorby.org redirects the user to http://mattcorby.org/gallery


Thanks for your help.  Give yourself a karma point.   :D

Joachim Müller

Then review the way your subdomain is set up. Not related to coppermine.