LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   PHP Accessing ImageMagick (https://www.linuxquestions.org/questions/programming-9/php-accessing-imagemagick-436971/)

Fedora Fiend 04-19-2006 11:03 PM

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...

scuzzman 04-19-2006 11:53 PM

Have you tried using the full path to convert (most likely /usr/bin/convert)? If that doesn't work, check which user the apache server is running as, and assure they have execute permissions on /usr/bin/convert.

Fedora Fiend 04-20-2006 12:03 AM

Yes & Yes
 
I have tried the full path and convert is publicly executable.

:(

Libertes 01-19-2007 01:33 PM

hi Fedora Fiend,

This is the same question i had and i see that again a thread that has no answer,
The exact answer is pass to Windows 2003, use apache under Windows and install imagemagick .exe easy setup file. That is all you have to do.

Similar argue was here with the solution, have a look at it.

http://www.linuxquestions.org/questi...d.php?t=386357

GOD BLESS MICROSOFT
THANK YOU BILL GATES


All times are GMT -5. The time now is 03:57 AM.