Page 1 of 1

PHP call python script - problem

Posted: Wed Nov 22, 2006 9:33 am
by ianripping
Hi,
I am calling a python command from PHP using

system($command)

The python script copies a file from one serer to another server.

If I run the python script outside of PHP - i.e from the command line, it works.
If I call it from PHP it doesn't.

All other function work in python - except when copying a file from one server to another.
Is there some problem with PHP's / Apache's interaction with system commands?


Someone has recommended doing the following with Apache but would like some advice first...
Start>Run>services.msc
Right click "Apache...", select properties.
Click on the "LOG ON" tab
Check the box "Allow this service to interact with desktop"
Click OK
Restart Apache


Any ideas?

Posted: Wed Nov 22, 2006 9:47 am
by volka
Someone has recommended doing the following with Apache but would like some advice first...
Start>Run>services.msc
Right click "Apache...", select properties.
Click on the "LOG ON" tab
Check the box "Allow this service to interact with desktop"
Click OK
Restart Apache
possible. Does the python script interact with the desktop (windows, message boxes etc)?

The default apache installation creates a service running on the account localsystem that (usually) has other settings and permissions than your interactive user account.

Posted: Wed Nov 22, 2006 9:54 am
by ianripping
volka wrote:
Someone has recommended doing the following with Apache but would like some advice first...
Start>Run>services.msc
Right click "Apache...", select properties.
Click on the "LOG ON" tab
Check the box "Allow this service to interact with desktop"
Click OK
Restart Apache
possible. Does the python script interact with the desktop (windows, message boxes etc)?

The default apache installation creates a service running on the account localsystem that (usually) has other settings and permissions than your interactive user account.
Hi, no it doesn't interact with desktop.

Do you know how to enable the apache account to have access to a shared folder on another server?

Posted: Wed Nov 22, 2006 1:42 pm
by volka
What kind of shared folder is it?
What permissions/credentials do you need to access the server?