From: wf at bitplan dot com
Operating system: Windows XP
PHP version: 5.0.5
PHP Bug Type: Unknown/Other Function
Bug description: strange exec behaviour on multiple quotes
Description:
------------
in the code below
$cmd='"C:/Programme/MySQL/MySQL Server 4.1/bin/mysql.exe"
--execute=status';
works, but
$cmd='"C:/Programme/MySQL/MySQL Server 4.1/bin/mysql.exe"
--execute="status"';
does not. The error message is:
failed with return-code: 1
Der Befehl "C:/Programme/MySQL/MySQL" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
This is very strange, since running the command in a cmd box in Windows
works in both cases.
Reproduce code:
---------------
$_output=array();
$cmd='"C:/Programme/MySQL/MySQL Server 4.1/bin/mysql.exe"
--execute="status"';
exec($cmd,$_output,$_retval);
if ($_retval==0) {
echo 'and done !<br />';
} else {
echo " failed with return-code: ".$_retval;
foreach($_output as $_outputline){
echo("$_outputline<br />");
}
Expected result:
----------------
exec should work in both cases
Actual result:
--------------
failed with return-code: 1
Der Befehl "C:/Programme/MySQL/MySQL" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
--
Edit bug report at http://bugs.php.net/?id=34671&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34671&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=34671&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=34671&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34671&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34671&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34671&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34671&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34671&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34671&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34671&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=34671&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=34671&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34671&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34671&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34671&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34671&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34671&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34671&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34671&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34671&r=mysqlcfg