Evan Chaney wrote:
In this particular instance I need PHP to be able to execute ImageMagick's "convert" binary which I installed using Fink. As it is, when I visit the page that has the PHP script in it Apache writes "sh: line 1: convert: command not found" to the error log.

After a few tests, I can only say that it works for me. When I put ". /sw/bin/init.sh" or, what is exactly the same thing, "source /sw/bin/init.sh" into /usr/sbin/apachectl (as second line, for example) and use the following code in my test.php:

 <?php
        $output = `env`;
        echo "<pre>$output</pre>";
         ?>

then I can clearly see all the fink-defined environment variables, and when I replace `env` by `convert --help`, I see the help page of convert.

This works when I start apache via the Sharing system pref panel. When I start it from the command line via "sudo apachectl start", I don't even need to put anything into /usr/bin/apachectl, it inherits my whole command line environment.

In addition, the system environment which I have defined in
~/.MacOSX/environment.plist is also inherited by php.

I have no idea why this shouldn't work in your case. What does your php script look like?

--
Martin



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Fink-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to