php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16975 [chm] bug on passthru
Submitted: 2002-05-02 16:07 UTC Modified: 2010-12-20 11:44 UTC
From: lowang at ipro dot pl Assigned:
Status: Not a bug Package: Program Execution
PHP Version: 4.2.0 OS: windows
Private report: No CVE-ID: None
 [2002-05-02 16:07 UTC] lowang at ipro dot pl
I have found a bug in passthru function.
It should return output generated by program to value but on my system it just print it to the browser and value sets to 0.
My script
<?
$txt = 'some txt^Z^Z^Z^Z'.chr(13);
passthru("echo ".escapeshellcmd($txt)." | tidy -config config.txt",$txt);
?>

there should be an output from tidy in $txt but passthru print the output and sets $txt to 0.

[chm date: 2002-04-20]...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-26 14:18 UTC] derick@php.net
Not a bug, please read the documentation more careful. It says that it will set $return_avr to the return value of the executed program. And echo simply returns 0 as exit code.
 [2010-12-20 11:44 UTC] jani@php.net
-Package: Tidy +Package: Program Execution
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 18:01:31 2024 UTC