Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shell script and ImageMagick 1

Status
Not open for further replies.

Dustman

Programmer
May 7, 2001
320
US
This is an odd one. I upgraded ImageMagick on my server from 5.3.8 to 6.2.7. I've got a simple php script setup to output the help command.

Code:
<?php
print "<pre>".`convert --help`."</pre>\n";
?>

When I run this from the web, it still shows 5.3.8 but when I run this script from the terminal, I get version 6.2.7.

Anybody out there have any idea why it is running the old version from php?

-Dustin
Rom 8:28
 
First, have you verified that your browser is not returning the old output from its cache? I would telnet on port 80 to the server and fetch the output to make sure -- see section 2.6 of faq434-2999 if you're not sure how to do this.

When you upgraded ImageMagick, did you overwrite the old version or install the new version beside the second? It may be that due to search path conditions, your script needs to specify the absolute filesytem path to the executable.


Want the best answers? Ask the best questions! TANSTAAFL!
 
Aha.. that got it. The old version was still installed. I didn't realize that. I copied the new one over the old one and it works fine now.

I'm still confused as to why php running through apache got the old one but php from the command line got the new one. Is there a seperate path declaration for apache?

-Dustin
Rom 8:28
 
It's almost certainly a path issue.

Compare your path as a logged-in user to the "PATH" setting in the "Apache Environment" section of the output of the PHP function phpinfo()


Want the best answers? Ask the best questions! TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top