Modifying the PATH variable within Apache

Posted on 2006-05-17
Last Modified: 2012-06-21
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.
Question by:NSimpson
    LVL 43

    Accepted 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...
    LVL 1

    Author Comment

    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

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
    It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now