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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
28 - 23 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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 Mar 28 08:01:28 2024 UTC