Greetings. 🙂
I think I've been working on this irritating problem for about a week now, from dawn to dusk. I've tried a lot of different approaches but with no luck.
I have a program called ImageMagick installed, and if i type the following in shell, it works just fine:
convert -debug all -resize 650x650 image1.jpg image2.jpg
however, this does NOT work:
<? $convert = exec("convert [...]"); print($convert); ?>
neither does this
<? $convert = passthru("convert [...]"); print($convert); ?>
or system or whatever else there is to choose from on php.net
Now - i get results fine if i use
<? $convert = exec("ls"); print($convert); ?>
and even, with exec("convert"); i GET THE LAST LINE, of what you get in the shell when you type "convert". So its NOT an issue of wether or not nobody:nobody has access to /usr/local/bin/convert - and i've done the 'su -m nobody' and tried to run the aforementioned convert, full with all the extra info thats just the thing you need to actually resize the d*mn thing.
Ive also tried something that was in the user comments on php.net
$foo = (`convert [blahblah]);
echo $foo;
I've ALSO tried just exec("imagefix"); , where i put the following in /usr/local/bin/imagefix:
#!/bin/sh
/usr/local/bin/lynx -dump -source http://www.mydomain.no/temp/index.php | sh
the URL simply read the aforementioned:
convert -debug all -resize 650x650 image1.jpg image2.jpg
And what happened if i su'ed to nobody and went to the www/temp/ directory and simply typed "imagefix"?
image was converted, no problems whatsoever.
I'm going to restrain myself a lot, I'm going to act civilised when i say this, and I will askfor assistance while still keeping my dignity.
Ahem
PLEASE HELP ME OH GOD PLEASE HELP ME IM DESPERATE!!! PLEAAAAAAASE!!!!!!!!!! 🙁 🙁 🙁
Yours faithfully
Praxiz Consternatio