PHP exec() and system() functions always return false in IIS

Posted by Loftx on Stack Overflow See other posts from Stack Overflow or by Loftx
Published on 2010-04-02T11:23:35Z Indexed on 2010/04/02 11:33 UTC
Read the original article Hit count: 292

Filed under:
|
|
|
|

Hi there,

I'm trying to use the PHP exec() or system() (or any other similar function) to run a batch file, but I can't seem to get these to return anything.

The simplest example I've seen is this, which outputs nothing:

<?php
    echo system('dir');
?>

The script is running on a windows XP machine on IIS with PHP installed and I've also tried it on my shared hosting account running windows 2003 server/IIS.

Can anyone suggest what I need to do to get this working, or provide any commands I can use for troubleshooting?

Cheers,

Tom

© Stack Overflow or respective owner

Related posts about php

Related posts about Windows