You should not be able to run any script on your server from your PHP. This is a security nightmare you should avoid. If you just have to be able to communicate with some random script on your server you should restrict the ability to only trusted computers (best thing use a different site which uses a different php.ini for that) or find a roundabout way to do that like using write to a file monitored by the python script to pass parameters. (open socket in your python can also be an option). If as you say in the comments you need to process the output on your local machine, just use a `wget` or whatever is its python equivalent to get the output from the site and then process it.