Pages

Monday, June 29, 2015

set PATH apache2

set PATH apache2

One of my friend was having a requirement with respect to updating Environment Variables. The Script will be in one path.The PHP Application contain a page which involve executing a  BASH Script. Even updating
/root/.bashrc, apache server was unable to execute the script and was giving the following error in /var/log/apache2/error.log

sh: 1: epub1.sh: not found





Again searching gave the solution and its located here.

http://serverfault.com/questions/151328/setting-apache2-path-environment-variable

Environment Variable for apache server process shall be configured in this file.

sudo vim /etc/apache2/envvars 


I updated the entry in the file

export PATH=$PATH:/Path_To_Script




Now restart the apache2 service and it worked for me.

No comments:

Post a Comment