I've been on this for a good few hours and I'm not getting anywhere.
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.
Any help please?
When a user data script is processed, it is copied to and run from /var/lib/cloud/instances/ instance-id / . The script is not deleted after it is run. Be sure to delete the user data scripts from /var/lib/cloud/instances/ instance-id / before you create an AMI from the instance.
Run the file command on that location /etc/alternatives/java . You can re-affirm the location running file command on the symbolic path: $ file /usr/lib/jvm/java-8-openjdk. x86_64/bin/java /usr/lib/jvm/java-8-openjdk.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With