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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: lowang at ipro dot pl
New email:
PHP Version: OS:

 

 [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: Tue Apr 23 09:01:27 2024 UTC