os.system() and PHP?

Phil Hunt philh at vision25.demon.co.uk
Thu Jan 13 21:19:22 EST 2000


In article <871z7lercw.fsf at ethereal.dhis.org>
           nolan at ethereal.dhis.org "Nolan Darilek" writes:
> The script is called, yet the os.system() in the Python script which
> calls mp3info doesn't work. I've inserted debugging prints into the
> script and have gotten output, and I printed the return code from
> os.system(), which is 256. The script works nicely from the command
> line; once I edit the track I can then call the script with the exact
> same command line and see the results I want.

When you run your Python script from the command line, is it running
as the same user that it runs as when it is invoked from PHP? Are
the environment variables the same?
 
> I'm thinking that perhaps PHP's passthru() prevents os.system() from
> running. Is there some sort of limitation on how many subshells a
> program can spawn?

IIRC Linux has a limit; it's quite high though. I imagine other
Unices are similar.


-- 
Phil Hunt - - - phil at comuno.com

 See Comuno's Linux coverage at <http://www.comuno.com/linux/> for:
* Links to useful sites * Linux-related news * Open source software *




More information about the Python-list mailing list