PHP escapes shell commands for me?
| From: | Arcady Genkin | Date: | Wed, 04 Jul 2001 21:02:12 +0000 |
| Subject: | PHP escapes shell commands for me? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-56232@lists.php.net to get a copy of this message | ||
PHP version 4.0.5 under:
SunOS 5.8 Generic_108528-07 sun4u sparc SUNW,Ultra-Enterprise
magic_quotes_gpc = On
magic_quotes_runtime = Off
It appears that PHP by default escapes arguments of any commands
passed to exec() and friends (passthru(), popen()). As a result I am
not able to pass an argument consisting of two tokens, separated by
space, as one argument.
Is this intended behavior? Is this inflicted by some option in
php.ini? I have another server running FreeBSD with virtually
identical php.ini file, and it doesn't exhibit such misbehavior.
Many thanks for any ideas,
--
Arcady Genkin
i=1; while 1, hilb(i); i=i+1; end