RE: [PHP] Getting PHP to work under IIS 6.0
| From: | Jay Blanchard | Date: | Fri, 03 Oct 2003 11:54:18 +0000 |
| Subject: | RE: [PHP] Getting PHP to work under IIS 6.0 | ||
| Groups: | php.general php.windows | ||
| Request: | Send a blank email to php-general+get-164892@lists.php.net to get a copy of this message | ||
[snip]
Has anyone been able to get PHP working fully under IIS 6.0? If so, try
the following script:
<?PHP
print_r(shell_exec('dir'));
?>
I get "Warning: shell_exec() [function.shell-exec]: Unable to execute"
whenever I try this or any other shell_exec or back tick (`) shell
function.
I've tried running in IIS 5.0 isolation mode, and setting all kinds of
execution permissions to no avail.
[/snip]
6.0 or 5.0 (you mention both)?
AFAIK print_r(shell_exec('dir')); will not work for several reasons...
shell_exec(
dir) would not return an array, so print_r for that would
be unable to execute. Have you tried opendir() and readdir()? That is
the way to get a directory listing.
Try this;
$var = shell_exec(dir);
echo $var;