when there are multiple problems, then nothing happens until all problems solved.
So try it inside out:
open a terminal (aka console aka lxterminal)
go inside dir: cd /var/www/html/website
ls -l hello.py
result should be 'readable, 'executable for all (for me, it is -rwxrwxrwx 1 root root 54 Mar 20 13:50 hello.py I have made this from root, but when permissions are correct this does not matter)
result should be a printout.
go inside dir: the terminal is already in this dir, doublecheck with pwd
ls -l buttons.py
result should be 'readable, 'executable for all
execute: php ./buttons.php
result should be a printout 'hello world'.
display file cat buttons.php
- add the echo before the exec statement in buttons.php
- check path in exec statement, must be '/var/www/html/website/hello.py' (edited later, name was wrong)
check directory access.
look for entry 'website', for me it is drwxr-xr-x so everybody can read and execute.
In browser, place url http://localhost/html/website/buttons.php
If there are still problems, can you access by apache/web simple php scripts like
echo "Hello, World!";
Hope this helps