Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I run this from php file
exec("epm package");
i got below error in error_log
sh: epm: command not found
I tested manually in terminal it works fine.
Try putting in a full path name:
exec("/path/to/epm package");
Your webserver process won't necessarily be set up with the same configuration as your own account.
Add a comment
sounds like epm isn't in the PATH environment variable for the user your webserver is running (probably apache). to solve this, do one of these:
epm
/whatever/folder/epm package
I'm assuming the user you are testing with in the terminal and the webserver user running your PHP are different. You need to make sure directory for the epm package is exported to the PATH environment variable for the webserver user.
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.