Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange behavior with the shell command

Status
Not open for further replies.

skiflyer

Programmer
Sep 24, 2002
2,213
US
I've run into a couple odd issues with the shell command, this are specifically on Windows boxes, I haven't checked much on others. Further I've noticed them on PHP 4.2 and 4.3, no other versions have been tested.

Specifically, running shell commands for which a program might output a stderr instead of a stdout, or running shell commands on non-existant paths.

It seems the first can always be caught with output buffering. (check php.net for ob_start())

And it seems the later is capable of actually corrupting and deleting (unsetting) php variables, and is NOT consistent... it may pass muster for 75% of your tests, but I would not count on it being stable in a Windows environment.

Hope I save somebody some frustration.

-Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top