Possible work-around for batch upload problem Possible work-around for batch upload problem
 

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

Possible work-around for batch upload problem

Started by forza, December 22, 2004, 02:25:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

forza

php 4.2.2
mysql 3.23.58
ImageMagick 6.1.7

After completing a fresh install on an older RH8 system I found I was unable to perform uploads (both batch and single file).

ImageMagick was consistently returning error 127 when it went to make the thumbnails/normals. The cause of this problem (in my case) was that the convert utility install location (/usr/bin) was not within the safe_mode_exec_dir specified in my php.ini.  I decided to resolve this problem without placing /usr/bin in my safe_mode_exec_dir by writing a quick and dirty bash script to call convert and placing it in my safe_mode_exec_dir:

#!/bin/bash
/usr/bin/convert $*
exit $?

This worked ok but now instead of an ImageMagick error 127 I was getting an ImageMagick error 1 (source file not found?). After blowing the better part of an afternoon banging on my convert shell script I discovered that the single quoted file arguments presented by php were not resolving correctly (e.g. the single quotes were being treated as literals).  Modifying the script to strip the single quotes seems to have fixed the problem at hand:

#!/bin/bash
CMD=`echo $* | sed -e s/\'//g`
/usr/bin/convert $CMD
exit $?

Just FYI, this most certainly is not the 'correct' way of fixing things, but it did get me past by my upload problems.  I am very interested in finding out what the long term fix for this is (server config/coppermine/?).

Hope this helps!

Joachim Müller

well, why didn't you put your image magick dir into safe_mode_exec_dir in php.ini? That would have been much easier imo, as the server appears to be yours to administer.

Joachim