Reputation: 581
run "mumudvb -l" command in the linux terminal has correct output. but in php the output is nothing.like this:
$output = exec('mumudvb -l');
$output = shell_exec('mumudvb -l');
$output = "" //the output
why this happen?
Upvotes: 0
Views: 1068
Reputation: 896
On Linux machines, setting that certain value in php.ini does not always work.
What I did was add the following sudoers group: %admin ALL=NOPASSWD: ALL
then make the www-data user run as admin usermod -G admin www-data
next, all the commands that you use with shell_exec, prefix them with sudo.
Upvotes: 0
Reputation: 151
You cannot use this function because php.ini know it's disabled functions in config file
+Solution:
Open your php.ini, find disable_functions
and remove your function then restart web server. BTW, becareful because security problem you may have. You should improve your server security
Upvotes: 1