• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 465
  • Last Modified:

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.
1 Solution
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...
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.

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

Tackle projects and never again get stuck behind a technical roadblock.
Join Now