1

I'm seeing an old path showing up on phpinfo under PATH. I've looked EVERYWHERE for it. Cannot figure out what's setting that path...

Checked php.ini, the apache conf files, there's no .htaccess, nothing in the index.php. Unless the old path is cached somehow somewhere, I cannot figure out where it's coming from.

I'm using Zend Server CE on Max OSX Leopard.

Did I overlook something? Any other place I should check for path being set?

UPDATE: I rebooted the machine figuring that might remove the phantom path, and it did!

joedevon
  • 2,649
  • 4
  • 28
  • 43
  • Which php.ini are you changing - the Zend Server one or the default Mac OS X install one? – John Parker Jul 28 '11 at 20:44
  • Marc_B: Confused. Are you saying the path can be compiled into php?? middaparka: the Zend Server one, which phpinfo reports is the one being used. I also removed all others. – joedevon Jul 28 '11 at 20:48

3 Answers3

1

Wonder if this helps?

See: $PATH environment variable for apache2 on mac

Talks about checking /System/Library/LaunchDaemons/org.apache.httpd.plist

Community
  • 1
  • 1
Jonathon
  • 778
  • 8
  • 21
1

PATH can be set by a variety of files. For example, on Linux (and I would imagine mac which is also BSD) it is set by the init proc on startup. Apache may never overwrite this path, so it might just be using the default startup path set by init or your default user profile. You can probably overwrite it for apache if necessary with /System/Library/LaunchDaemons/org.apache.httpd.plist, or wherever apache is installed to.

As an example, when you run php --info as another user, what is PATH set to?

Explosion Pills
  • 188,624
  • 52
  • 326
  • 405
  • >PATH can be set by a variety of files. *I've tried to find every file that can set path on OSX, but haven't been able to identify the culprit. >As an example, when you run php --info as another user, what is PATH set to? *That was actually very helpful. It told me nothing about the phantom path, but did spit out an error that helps explain why memcached isn't working...which is why I'm looking at Path in the 1st place :) Unable to load dynamic library '/blah/memcached.so'-dlopen(/blah/memcached.so, 9)no suitable image found.Did find /blah/memcached.so: mach-o, but wrong architecture.. – joedevon Jul 28 '11 at 22:20
0

PATH is an environmental variable and does not have anything to do with PHP or Apache.

Here is an article: http://mactip.blogspot.com/2004/04/setting-environment-variables.html

linepogl
  • 9,147
  • 4
  • 34
  • 45
  • Kinda true, though I do set environment variables in both sometimes... But the question is what's setting the PATH? Your link was interesting, but I don't have that file... – joedevon Jul 28 '11 at 20:54