PHP Accessing ImageMagick
I have a dedicated server that I am very happy with. It does everything I could ever imagine and runs like a top. Of course running Linux Fedora! The only problem that I have is with ImageMagick. I can issue a command from the shell such as "convert /path/to/file -resize 1024x768 /path/to/file" with out a problem. ImageMagic is obveously publically executable because any user I logon with, not just root, can execute "convert". My problem is when I try to issue a command using PHP, for example: "convert /path/to/file -resize 1024x768 /path/to/file" I get an error indicating that the convert file/command (not the image file I am trying to resize) does not exist or is inaccessable. Myself and my hosting company is stumped, and they are GOOD!
I did write a program in C as a work around that I would execute from PHP with a console command with the filenames and sizing options as arguments that is placed in an accessible directory, and it does the job. However, to me this seems inefficient for, my time, and my server's CPU cycles. It just isn't the right way to do things and it bugs me!
If anyone has any ideas or work arounds (that don't involve running a third application like stated above) please let me know. I would like to resolve this issue.
Thanks for your time...
|