I've just installed ImageMagick using macports and am trying to use it from a php site running on Apache, but nothing I do works to add /opt/local/bin:/opt/local/sbin to my path.

So far I've tried

  • adding an export to .bash_profile (macports already did this for me)
  • adding an environment variable declaration to or.apache.httpd.plist, which totally overwrites the path (using $PATH to refer to the previous path doesn't get recognised)
  • redefining the PATH in /usr/sbin/envvars
  • using export in /usr/sbin/envvars
  • using setenv in launchd.conf
  • using export in launchd.conf
  • adding to the list in /etc/paths

Any ideas

  • 1
    Is this the standard apache/php included in OS X or did you install a MAMP distribution (and if yes, which one)? Does IM work if you specify the full path from within your PHP code or if you symlink the binaries to /usr/bin for testing? – nohillside Apr 22 '13 at 13:11
  • It is the standard OSX apache and PHP. Symlinks was a fantastic idea and works perfectly (why doesn't macports do this for me?! I thought the whole point was that it avoids your having to muck around with stuff like this) – wheresrhys Apr 23 '13 at 8:23

You must log in to answer this question.

Browse other questions tagged .