hello,
when i start a php exec a bash script with a 'convert IM script',
i get the error message:
" convert: unrecognized option `-brightness-contrast' @ convert.c/ConvertImageCommand/791."
but:
i can start directly the bash-shell test.sh without any errors
i can start a php script with directly exec. convert without errors
and !! a crop or other functions run without errors
only with 'brightness-contrast' in a background started shell-script get errors
My simple scripts:
##################################################################
start.php (with errors)
<?
exec("sudo -s nohup test.sh > /dev/null 2> /dev/null & echo $!") ;
echo "end convert ..."
?>
##################################################################
test.sh
#!/bin/sh
convert a.jpg -brightness-contrast 5x10 b.jpg ## with errors
convert a.jpg -crop 200x100+0+0 c.jpg ## without errors
exit
##################################################################
start.php (without errors)
<?
exec("sudo -s convert a.jpg -brightness-contrast 5x10 b.jpg ") ;
?>
##################################################################
My system:
centos 6 2.6.32-279.22.1.el6.x86_64
Version: ImageMagick 6.8.3-1 2013-02-21 Q16
Can anybody help me?
php & bash = unrecognized option `-brightness-contrast'
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: php & bash = unrecognized option `-brightness-contrast'
Are you sure you do not have multiple version of IM installed and an older version is being used for which it predated -brightness-contrast?
Put the path to where IM resides into your command. Typically it will be /usr/bin or /usr/local/bin.
try
/usr/bin/convert -version
and
/usr/local/bin/convert -version
and see which is using the version you believe is what you have.
Put the path to where IM resides into your command. Typically it will be /usr/bin or /usr/local/bin.
try
/usr/bin/convert -version
and
/usr/local/bin/convert -version
and see which is using the version you believe is what you have.
Re: php & bash = unrecognized option `-brightness-contrast'
was exactly the problem
a multiple version of IM
made a symlink to the wrong /bin path and now all work fine
thanks a lot
a multiple version of IM
made a symlink to the wrong /bin path and now all work fine
thanks a lot