I want to run Python script from PHP. The script's syntax is good, when I run it from command line it generates an image file next to it. When I run the PHP file (contains Python exec) from command line it generates an image file. It's good. The problem is: when I use browser and run PHP it isn't generate any image file. I use Xubuntu OS.
2
-
2probably permission issues ... (its trying to write the image to a directory that the web acct does not have write access to)Joran Beasley– Joran Beasley2013-10-16 19:08:14 +00:00Commented Oct 16, 2013 at 19:08
-
I added the neccessary permissions to the folder, but it doesn't work.Panthesilea– Panthesilea2013-10-17 15:50:56 +00:00Commented Oct 17, 2013 at 15:50
Add a comment
|
2 Answers
Does the script that you are trying to run requires sudo privileges? If so, you will need to add the user "www-data" or web user with the command (full path) to the sudoers file (Ubuntu /etc/sudoers or execute visudo command).
More info here https://help.ubuntu.com/community/Sudoers
Another thing to look at is at memory_limit in your php.ini directive. You might be using all memory allowed to use.