Can't execute "convert" Can't execute "convert"
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Can't execute "convert"

Started by aguasch, July 12, 2007, 05:53:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

aguasch

Fresh install, Coppermine 1.4.12, on an HP/UX 11.11 server running HP's modified Apache 2.0.52 and PHP 4.3.8. ImageMagick is installed and works. After unpacking the Coppermine zip file and changing permissions as instructed (and creating albums/uploads directory), I attempt to install it. HP doesn't include GD in their system, and I'm wary about rebuilding PHP on this thing, so I want to use ImageMagick. I entered the correct path to the convert program (/usr/local/bin). I get the following errors:

Warning: getimagesize(albums/userpics/im.gif): failed to open stream: No such file or directory in /sirsi/htdocs/cpg1412/install.php on line 114

Warning: unlink(albums/userpics/im.gif): No such file or directory in /sirsi/htdocs/cpg1412/install.php on line 115

and

The installer found the ImageMagick 'convert' program in '/usr/local/bin/', however it can't be executed by the script.

You may consider using GD instead of ImageMagick.

Yes, I've read the FAQ and searched the forums. I've checked the permissions. I've tried convert from the commandline. PHP safe mode is off. exec() is allowed. I even wrote a short php script that calls convert, grabs an image from one directory, and converts it into a different format and places it in the albums/userpics directory. It works, so apparently the www user (the server runs under that user) has no problem executing convert, or in writing to that directory.

Is there anything else I can try?

Joachim Müller

The error message should be pretty self-explanatory:
Quote from: aguasch on July 12, 2007, 05:53:49 PMThe installer found the ImageMagick 'convert' program in '/usr/local/bin/', however it can't be executed by the script.
This is related to webserver setup and the fact that you appear to be self-hosting: as the error message suggests, the user the webserver runs under (usually "apache" or "nobody") doesn't have execute permissions on ImageMagick's convert executable. You'll have to set permissions accordingly. As suggested: not a problem with coppermine, but webserver setup.
Please understand that we can only support coppermine. We can't support you how to set up a webserver. Minimum requirements to run coppermine is a properly configured webserver with one of the image libraries Coppermine can work with (either GD or ImageMagick) set up and configured properly. This includes setting permissions - if the PHP process tries to run ImageMagick's convert executable, it of course needs permissions to do so.

aguasch

It's not a webserver problem. The permissions are correct (as described in the documentation), and the webserver setup is correct. The problem is somewhere else. As I mentioned in my initial post, I wrote a short PHP script that was able to execute convert and write a new image to the albums/userpics directory. My insanely simple script:

<?php

   exec('/usr/local/bin/convert /www/htdocs/images/test.jpg /www/htdocs/cpg1412/albums/userpics/test.tga');

?>

This works. The webserver (user "www" on HP/UX) was able to run convert and write to the directory in question - same server, same user, same convert utility, same permissions, except with my one-line script it worked, and with Coppermine it didn't.

Is there anything else I can try, since apparently permissions on convert are not the issue?

Joachim Müller

Do you have any hardening patches applied (like SUExec)?

aguasch

I found and fixed the problem. My test was converting a JPEG to TGA - the install script converts a PNG file. I tried converting that file manually, and failed. Apparently, this idiotic HP/UX box doesn't ship with libpng installed. I installed libpng, and the installation script worked perfectly.

Uploads aren't working at the moment (no error, just a blank screen). I'm trying to track that down, and will post a request for help to the appropriate forum if I'm unable to solve it.

I really, really hate HP/UX.