php & bash = unrecognized option `-brightness-contrast'
Posted: 2013-08-26T09:09:09-07:00
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?
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?