Running shell_exec('which java') in PHP return nothing

Savannah Penson

New Member
If I run\[code\]which java\[/code\]from the command line I get the proper input (/usr/java/.../bin/java). However if I run it in a php script:\[code\]<? echo 'java. ' . shell_exec('which java'); echo 'ls. ' . shell_exec('which ls');?>\[/code\]nothing gets printed out for which java but I get the proper results for which ls...
 
Back
Top