I installed a program on my debian server. I can execute it with: ./programm
and the result is a wall of text and it is creating a HTML file with this text.
Now I am trying to execute the ./programm
from a browser with PHP. The apache user is www-data and I added execute rights for this program.
I wrote a little PHP script:
test.php:
<?php
error_reporting(E_ALL);
shell_exec('./programm 2>&1');
?>
The path is okay because I have all files in the same directory for testing. With the user www-data i execute in the shell:
php test.php
Results in a wall of text and the created HTML file (it's working).
Now i try it from browser:
"Aborted"
Why isn't it working?