Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm on CentOS.

I have a php script that needs to have /usr/lib64 in its $PATH.

From the php script when I output

echo $PATH

I get


when I ouput

echo $USER

I get a 1 character long blank space.

I created a in /etc/profile.d with


export PATH

I logged in logged out using SSH several times. I also tried

source /etc/profile

to no avail, as my script still only has /bin and /usr/bin in its $PATH

Any ideas, pointers ? Thanks

share|improve this question

PHP is run via HTTPd. Modify the httpd initscript to frob $PATH appropriately.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.