php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27945 returned string from 'passphru' is not exploteable/splitable
Submitted: 2004-04-10 16:42 UTC Modified: 2004-04-10 16:51 UTC
From: nullzone at nullzone dot org Assigned:
Status: Not a bug Package: Program Execution
PHP Version: 4.3.5 OS: Linux Debian-Sarge Kernel-2.6.5
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nullzone at nullzone dot org
New email:
PHP Version: OS:

 

 [2004-04-10 16:42 UTC] nullzone at nullzone dot org
Description:
------------
I have used passphru to execute a external code.
I cannot work with the string that I get back from the passphru.

I have tryed to use the 'explode' and 'split' functions to get a Array from the string that i got after a passthru.
I always get a array with a member only (all the string).

-------------------------------------------------------
Shell-script file: lala.bash
-------------
#!/bin/bash
echo lala@lele
-------------
BAD php code:
-------------
$array = explode ("@", pasthru("lala.bash") );
-------------
$array will have only a member, just "lala@lele" and not 2, one with lala, and other with lele

All works with exec. Anyway think about a multi-line return from a execution.


Reproduce code:
---------------
$array = explode ("@", pasthru("lala.bash") );


Expected result:
----------------
Array( 0=> 'lala' , 1=> 'lele')


Actual result:
--------------
Array( 0=> 'lala@lele')


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-10 16:51 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

RTFM: http://php.net/passthru
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 05:01:27 2024 UTC