Problem with ImageMagick

Reply

Join Date: May 2008
Posts: 12
Reputation: psyb0rg is an unknown quantity at this point 
Solved Threads: 1
psyb0rg psyb0rg is offline Offline
Newbie Poster

Problem with ImageMagick

 
0
  #1
Oct 23rd, 2009
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!
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1,402
Reputation: ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light 
Solved Threads: 225
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey
 
0
  #2
Oct 23rd, 2009
Originally Posted by psyb0rg View 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!
PHP has built-in ImageMagick functions, why are you using an external program?
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 12
Reputation: psyb0rg is an unknown quantity at this point 
Solved Threads: 1
psyb0rg psyb0rg is offline Offline
Newbie Poster
 
0
  #3
Oct 23rd, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1,402
Reputation: ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light 
Solved Threads: 225
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey
 
0
  #4
Oct 23rd, 2009
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 12
Reputation: psyb0rg is an unknown quantity at this point 
Solved Threads: 1
psyb0rg psyb0rg is offline Offline
Newbie Poster
 
0
  #5
Oct 23rd, 2009
Thanks. Looking into it.

No idea about debugging exec()?
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1,402
Reputation: ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light 
Solved Threads: 225
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey
 
0
  #6
Oct 23rd, 2009
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.
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Reply With Quote Quick reply to this message  
Reply

Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC