#27945 [NEW]: returned string from 'passphru' is not exploteable/splitable

From: Date: Sat, 10 Apr 2004 20:42:13 +0000
Subject: #27945 [NEW]: returned string from 'passphru' is not exploteable/splitable
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-57900@lists.php.net to get a copy of this message
From:             nullzone at nullzone dot org
Operating system: Linux Debian-Sarge Kernel-2.6.5
PHP version:      4.3.5
PHP Bug Type:     Program Execution
Bug description:  returned string from 'passphru' is not exploteable/splitable

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')


-- 
Edit bug report at http://bugs.php.net/?id=27945&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27945&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27945&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27945&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27945&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27945&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27945&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27945&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27945&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27945&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27945&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27945&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27945&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27945&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27945&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27945&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27945&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27945&r=float


Thread (2 messages)

« previous php.bugs (#57900) next »