|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-09-28 14:39 UTC] wf at bitplan dot com
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.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 05:00:01 2025 UTC |
broken in 5.2.6 tested 5.3.0alpha2, and now works. simply used system('"fr" "ed"'); with procmon from sysinternals to see what is executed. 5.2.6 shows cmd.exe /c "fr" "ed" 5.3.0alpha2 shows cmd.exe /c ""fr" "ed""