bash - function shell_exec() php works with shell but not with interface ← (PHP)

one text

I am doing a script in php who execute a script bash(.sh).

The script works in shell but not with the interface.

Script:

<?php

echo 'test'."\n"."<BR/>";

$old_path = getcwd();
$cmd = chdir('/db/ITSA/BILLING_GENERATOR/');
echo getcwd()."\n"."<BR/>";

$output = shell_exec("./test.sh");
if($output === null){
var_dump($output2);
}else{
echo 'Pas de sortie!'.'<BR/>';
};
echo $output;
echo '<BR/>';
echo exec('whoami');

when I run php script.php on the server => output ok

when I run the script in the application have not the output with the shell_exec function.

But all other works fine.

Has someone had ever this issue. Thank you for your help.

Source