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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 12:01:32 2025 UTC