Problem with running python script from PHP
Posted: Tue May 04, 2010 10:45 am
Hi,
I am running a python script from PHP.
Here is the flow -
I am using popen of PHP to call python script.
In this python script I am giving a call to a python module "xlrd" for excel file parsing. python code - workbook = xlrd.open_workbook(filename)
When flow comes to using this python module "xlrd", flow completely exits and scripts stop working. I get all the echo messages from python before this module is accessed and no messages are displayed after that.
When I run python script individually (through command line) it works just fine. Problem occurs only if PHP calls this script.
Is there a problem with PHP buffer in this? PHP is not able to load this in its buffer?
Is there any solution for this?
I am running a python script from PHP.
Here is the flow -
I am using popen of PHP to call python script.
In this python script I am giving a call to a python module "xlrd" for excel file parsing. python code - workbook = xlrd.open_workbook(filename)
When flow comes to using this python module "xlrd", flow completely exits and scripts stop working. I get all the echo messages from python before this module is accessed and no messages are displayed after that.
When I run python script individually (through command line) it works just fine. Problem occurs only if PHP calls this script.
Is there a problem with PHP buffer in this? PHP is not able to load this in its buffer?
Is there any solution for this?