From: [EMAIL PROTECTED]
Operating system: Windows NT 4.0/ Windows 2000
PHP version: 4.1.1
PHP Bug Type: Performance problem
Bug description: passthru() fails if more than one command line argument is quoted
Problem:
When the command line passed to passthru contains more than
one argument that is quoted, the command line is not run.
For example:
passthru("\"C:\\Some dir\\prog.exe\" arg"); -- works
passthru("\"C:\\Some dir\\prog.exe\" \"new arg\""); --fails
Systems tested:
Windows NT 4.0 and Windows 2000
Apache 1.3.22 with php4apache.dll
PHP versions 4.1 and 4.1.1 (problem not present w/ 4.06)
PHP and Apache are the distributed Windows binaries
safe_mode is off
Example script:
<html>
<head>
<title>PHP Test Script</title>
</head>
<body>
<h1>PHP Test Script</h1>
<?php
function write_example($command)
{
// Write a header.
echo "\n<h2>Command: ", htmlspecialchars($command), "</h2>\n\n<pre>\n";
// Run the command.
passthru($command);
// Finish up the section.
echo "\n</pre>\n";
// Done, return.
return false;
}
write_example("test.bat");
write_example("\"test.bat\"");
write_example("\"test.bat\" arg");
write_example("\"test.bat\" \"arg\"");
?>
</body>
</html>
Contents of "test.bat" (goes in same dir as script above):
@echo Batch file run OK
--
Edit bug report at: http://bugs.php.net/?id=14982&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]