#49478 [Com]: shell_exec does not work
| From: | ian at iglou dot com | Date: | Tue, 22 Sep 2009 05:18:16 +0000 |
| Subject: | #49478 [Com]: shell_exec does not work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-142649@lists.php.net to get a copy of this message | ||
ID: 49478
Comment by: ian at iglou dot com
Reported By: elmue at gmx dot de
Status: Open
Bug Type: Program Execution
Operating System: Windows
PHP Version: 6SVN-2009-09-06 (snap)
New Comment:
Also broken in PHP Version 5.2.10; safe mode off.
An earlier version (no record of which) did work when used thus to get
a Windows dvd volume label:
if (preg_match('#Volume in drive [a-zA-Z]* is (.*)\n#i',
shell_exec('dir '.$drive.':'), $m)) {
$volname = ' ('.$m[1].')';
Previous Comments:
------------------------------------------------------------------------
[2009-09-06 00:49:59] elmue at gmx dot de
Description:
------------
On PHP 6 VC 6 from 3.sept.2009 the shell_exec command is broken.
Tested on Xampp on Windows XP with Apache 2.2.9.
Whatever you put into shell_exec e.g.
shell_exec("dir C:\\")
produces a
Warning shell_exec() [function.shell-exec]: Unable to execute 'dir
c:\'
The same script works fine on PHP 5
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49478&edit=1