Date: 06/29/01
- Next message: sniper <email protected>: "[PHP-DEV] Bug #10986 Updated: makerpm script make a wron version no."
- Previous message: veins <email protected>: "[PHP-DEV] Bug #11767 Updated: Bad escape sequence"
- Next in thread: veins <email protected>: "[PHP-DEV] Bug #11767 Updated: Bad escape sequence"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 11767
User Update by: veins <email protected>
Status: Open
Bug Type: Program Execution
Operating system: Unix
PHP Version: 4.0.6
Description: Bad escape sequence
Previous Comments:
---------------------------------------------------------------------------
[2001-06-28 02:27:48] veins <email protected>
When safe_mode is set to On, it is impossible to pass a variable that contains a string with a space in it as an argument to any system() like function. The following script shows the problem:
<?
$somevar = "this is a test";
exec("echo.sh $somevar", $return);
echo $return[0];
?>
echo.sh being a simple shell script that echoes back anything that we feed it. The following PHP script will display 'this' instead of 'this is a test'. I tried backslashing every chars of the variable by writing a simple function but spaces seems not to be correctly passed to the shell script. The same script executed when safe_mode is set to off works perfectly...
Veins - Veins <email protected>
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=11767
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: sniper <email protected>: "[PHP-DEV] Bug #10986 Updated: makerpm script make a wron version no."
- Previous message: veins <email protected>: "[PHP-DEV] Bug #11767 Updated: Bad escape sequence"
- Next in thread: veins <email protected>: "[PHP-DEV] Bug #11767 Updated: Bad escape sequence"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

