944,108 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 405
  • PHP RSS
Oct 23rd, 2009
0

Problem with ImageMagick

Expand Post »
I have Ghostscript and IMagemagick installed on my local machine. I can access the IM functions from the command line. The environment variables are also set.

The problem is that when I try to execute the IM function using PHP's exec() method, I get no result. The same script works on my remote web host.
When the execution is successful, exec() returns a 0. On my local machine, it returns 4.

Is there a way to see any kind of error message returned from exec()? How do I know that PHP is able to find IM?

Any help in this matter would be useful!
Similar Threads
Reputation Points: 10
Solved Threads: 1
Newbie Poster
psyb0rg is offline Offline
18 posts
since May 2008
Oct 23rd, 2009
0
Re: Problem with ImageMagick
Click to Expand / Collapse  Quote originally posted by psyb0rg ...
I have Ghostscript and IMagemagick installed on my local machine. I can access the IM functions from the command line. The environment variables are also set.

The problem is that when I try to execute the IM function using PHP's exec() method, I get no result. The same script works on my remote web host.
When the execution is successful, exec() returns a 0. On my local machine, it returns 4.

Is there a way to see any kind of error message returned from exec()? How do I know that PHP is able to find IM?

Any help in this matter would be useful!
PHP has built-in ImageMagick functions, why are you using an external program?
Sponsor
Reputation Points: 520
Solved Threads: 268
Code Monkey
ShawnCplus is offline Offline
1,564 posts
since Apr 2005
Oct 23rd, 2009
0
Re: Problem with ImageMagick
What are those functions? As far as I know, IM' tools have to be called through the command line. And that is what exec() does.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
psyb0rg is offline Offline
18 posts
since May 2008
Oct 23rd, 2009
0
Re: Problem with ImageMagick
Sponsor
Reputation Points: 520
Solved Threads: 268
Code Monkey
ShawnCplus is offline Offline
1,564 posts
since Apr 2005
Oct 23rd, 2009
0
Re: Problem with ImageMagick
Thanks. Looking into it.

No idea about debugging exec()?
Reputation Points: 10
Solved Threads: 1
Newbie Poster
psyb0rg is offline Offline
18 posts
since May 2008
Oct 23rd, 2009
0
Re: Problem with ImageMagick
exec only returns the response code, use shell_exec, that'll get all of the output so if imagemagick is producing errors you'll be able to see them.
Sponsor
Reputation Points: 520
Solved Threads: 268
Code Monkey
ShawnCplus is offline Offline
1,564 posts
since Apr 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: newnewnew
Next Thread in PHP Forum Timeline: Setting an array for a mysql query with php





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC