Setting path variable for apache user on Amazon EC2
apache, environment-variables, linux, path
Solution
Ended up following what Alfe suggested in his answer, except rather than in the `/etc/init.d/httpd` file (which could be overwritten easily on update) I added to `/etc/sysconfig/httpd`:
`export PATH=${PATH:+$PATH:}/usr/local/bin`
Problem
I can't add `/usr/local/bin` to the apache users `PATH` variable. The user doesn't have a `.profile`, I can't `su` to the user, I can't export to the `PATH` from php using `exec` and adding `SetEnv PATH /usr/local/bin` To either the `http.conf` or the `.htaccess` file doesn't make a difference. I can't find the `envvars` file to change that but I suspect there's some other problem. I have restarted apache, and indeed my server.