Modifying the PATH variable within Apache

How do I modify the PATH variable within Apache?

Using phpinfo() I can see that the path is set to /usr/sbin:/usr/bin.

I've tried modifying /etc/default/login and using SetEnv PATH <path> within the httpd.conf file, neither appeared to work.

I'm running Apache 2.2.0 from Blastwave on Solaris 10.
LVL 1
NSimpsonAsked:
Who is Participating?
 
ravenplConnect With a Mentor Commented:
I'm not familiar with Your OS config, but
find the script starting apache, redefine/export PATH - should do.
/etc/default/login don't work, as service dosen't login...
0
 
NSimpsonAuthor Commented:
Yeah, I figured that /etc/default/login wouldn't work but I'd tried everything! Well, everything except reading the /etc/rc3.d/S50CSWapache2 script. It pointed me towards the envvars file which was located in apache2/sbin. Adding the PATH variable to that sorted the problem. Slightly different from your answer but you pointed me in the right direction (not sure how I managed to forget that myself) so top marks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.