[Tutor] Problem Passing VARs to Python from PHP & capturing return string

Steven D'Aprano steve at pearwood.info
Sat Oct 23 02:57:38 CEST 2010


On Sat, 23 Oct 2010 05:52:06 am Roy Hinkelman wrote:
> My script doesn't want to recognize the variables from the exec()
> command in PHP. Plus, it won't capture the results of the script.

"My script"? What are you talking about? You have at least two -- a PHP 
script and a Python script. If you're having problems with the PHP 
exec() command, that's probably a problem with the PHP script and you 
need to take it up with a PHP list.

> This Python script works in IDLE, and I've got some testing code in
> there.

If it works fine, why are you showing it to us?


> One Known Unsolved Issue:
> I put Python in C:\Program Files\Python26\python.exe and have tried
> $command = "C:\Program Files\Python26\python.exe
> include/weatherFeed.py -c $city -s $state";
> to no avail.

Unfortunately my crystal ball is broken, and I have a court order 
prohibiting me from reading people's minds, so I'm afraid I'm going to 
have to insist that you actually explain *what the problem is* instead 
of expecting us to guess.

What is the unsolved issue? 
What do you expect the above line to do? 
What does it do instead?


> I added .py to Windows IIS Web Service Extensions and to the
> Application Configuration.

How exciting! And what happened then?



-- 
Steven D'Aprano


More information about the Tutor mailing list