Call python script on php and resolve errors

I have php / action.php. This script creates a file in the .. /data/myfile.kml folder. After creating this file, I want to change it. Therefore i call python script

exec("python mypythonscript.py someparams");

Php errors are displayed when I call the website. Is there a way to show the python era on a website too?

This means that the python script works when I execute it using the terminal, but php does not work to run the script. So I need some tips to track where the problem lies. I have to say that I am new to web programming, so please be a little patient. If you need to know more to help me, I will be happy to answer your questions.

Regards Aufwind

0
source share
2

, php script , , , . php ( www-data), , python script.

+2

exec, ( ):

exec("python mypythonscript.py someparams",$my_output);
var_dump($my_output);

.

+6

All Articles