I want to edit images using ImageMagick and PHP on my website.
I'm on Linux (Raspbian OS) and have PHP and ImageMagick installed.
I'm trying to do something similar to: `convert test.png test.webp` using PHP. All work in the Terminal.
What I've tried:
putenv("PATH=/usr/local/bin:/usr/bin:/bin");
Full command path "/usr/bin/convert test.png test.webp
" (Work in Terminal)
All of the PHP CMD commands including: exec()
shell_exec()
system()
passthru()
(All of the output of those were empty, but simple commands like echo $PWD
worked)
Images Full Path "convert /home/pi/www/test.png /home/pi/www/test.webp
" (And all of the above variations)
Any help in hugely appreciated!
My Answer:
you please provide more context or specify your question about Linux?
Rate this post
4 of 5 based on 2010 votesComments