Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Possible work-around for batch upload problem  (Read 2531 times)

0 Members and 1 Guest are viewing this topic.

forza

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Possible work-around for batch upload problem
« on: December 22, 2004, 02:25:19 am »

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!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Possible work-around for batch upload problem
« Reply #1 on: December 22, 2004, 05:52:48 pm »

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
Logged
Pages: [1]   Go Up
 

Page created in 0.013 seconds with 15 queries.