LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-19-2006, 11:03 PM   #1
Fedora Fiend
LQ Newbie
 
Registered: Mar 2006
Location: USA
Distribution: Fedora - Core 5
Posts: 3

Rep: Reputation: 0
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...
 
Old 04-19-2006, 11:53 PM   #2
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
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.
 
Old 04-20-2006, 12:03 AM   #3
Fedora Fiend
LQ Newbie
 
Registered: Mar 2006
Location: USA
Distribution: Fedora - Core 5
Posts: 3

Original Poster
Rep: Reputation: 0
Yes & Yes

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

 
Old 01-19-2007, 01:33 PM   #4
Libertes
Member
 
Registered: Jan 2007
Posts: 86

Rep: Reputation: 16
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

Last edited by Libertes; 01-19-2007 at 01:37 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[php] accessing command line dtra Linux - Software 1 04-26-2005 07:19 PM
Accessing http header in PHP artois_val Programming 1 08-07-2004 10:20 AM
PHP: accessing unnamed array mrtwice Programming 8 04-28-2004 11:14 AM
PHP 4.3 accessing Interbase 7 on Linux PaulC24 Linux - Software 0 04-20-2003 05:15 PM
accessing mysql from apache/php vher Linux - General 4 01-21-2003 08:06 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration