Hi all, I am trying to run a Python program using PHP. Here's the code
$command = '/usr/local/bin/python script.py file';
$temp = exec($command, $output);
This works through the command line but not while running it through the browser. I am using Apache so probably it needs the right privileges? I am pretty new to Linux and have no idea how to get this working.
Any help would be appreciated!
Edit 1:
Tried to use proc_open
but nothing happens. I gave the full path to the script. Made the script executable but no luck. Any other things I can try on the server? (It's a CentOS 5)