Try executing this before you call exec
:
putenv("PATH=" .$_ENV["PATH"]. ':/usr/local/git/bin:/usr/X11/bin');
More Related Contents:
- Run Bash Command from PHP
- Setting environment variables on OS X
- php exec command (or similar) to not wait for result
- Running a Python script from PHP
- How do you run a .bat file from PHP?
- PHP StdErr after Exec()
- Why is my $_ENV empty?
- Setting PATH environment variable in OSX permanently
- PHP Fatal Error Failed opening required File
- Get absolute path of initially run script
- Setting environment variables for accessing in PHP when using Apache
- PHP exec() as Background Process (Windows Wampserver Environment)
- How to get system environment variables into PHP while running CLI & Apache2Handler?
- When setting environment variables in Apache RewriteRule directives, what causes the variable name to be prefixed with “REDIRECT_”?
- PHP recursive directory path
- Checking if process still running?
- PHP exec – check if enabled or disabled
- Run a ffmpeg process in the background
- How to set global environment variables for PHP
- PHP exec() will not execute shell command when executed via browser
- Set an environment variable in .htaccess and retrieve it in PHP
- $PATH environment variable for apache2 on mac
- Running python script in Laravel
- Convert array of paths into UL list
- PHP exec() not returning error message in output
- root path doesn’t work with php include
- What’s the difference between escapeshellarg and escapeshellcmd?
- Bash script to run php script
- How to pass parameters from bash to php script?
- php in background exec() function