I'm trying to execute a command thru shell_exec(); but it does nothing. I know shell_exec(); is enabled because these work perfectly:
echo shell_exec('which php');
echo shell_exec('ls');
They do output correctly.
The problem is when I want to execute something like this:
shell_exec("php file.php var1 var2 > /dev/null &");
It does nothing, but when I run it thru the Terminal on my computer, it does work. I have also tried doing it with the full path like this:
shell_exec("/usr/bin/php /full/path/file.php var1 var2 > /dev/null &");
And it doesn't work, but again... it works if I run it thru my Terminal's computer.
The php.ini safe mode is off, and there are no disabled functions on it, so I don't know what could be happening. And yes, I have access to SSH and got a dedicated IP.