ID: 32826 User updated by: jan dot klepal at bonicom dot cz Reported By: jan dot klepal at bonicom dot cz Status: Bogus Bug Type: Safe Mode/open_basedir Operating System: Linux PHP Version: 4CVS-2005-04-25 (stable) New Comment:
I am confused... Documentation says: With safe mode enabled, all words following the initial command string are treated as a single argument. Thus, echo y | echo x becomes echo "y | echo x". Try this with safe_mode enabled: file args.sh #!/bin/sh echo First arg: $1 echo Second arg: $2 and php: passthru('args.sh one two'); According to doc, I shoud get: First arg: one two Second arg: But I get: First arg: one Second arg: two So echo y | echo x doesn't become echo "y | echo x" but echo y \| echo x. Previous Comments: ------------------------------------------------------------------------ [2005-04-25 22:44:13] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php RTFM ------------------------------------------------------------------------ [2005-04-25 21:58:25] jan dot klepal at bonicom dot cz Description: ------------ While safe_mode is enabled PHP slash quotes in arguments passed to programs executed by exec functions. Reproduce code: --------------- passthru("echo \"some 'quoted' text\""); passthru("echo 'some \"quoted\" text'"); Expected result: ---------------- some 'quoted' text some "quoted" text Actual result: -------------- some \'quoted\' text some \"quoted\" text ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32826&edit=1