Page 1 of 1

Shell window opens on exec call

PostPosted: 16. March 2007 16:57
by rracasanu
Hello,

I have installed XAMPP 1.6.0a on a Windows XP SP2 without changing anything to the install defaults. Everything seems to work OK, except for the exec function. Whenever it is used, a shell window opens while the command is being executed. For example, I have this test script:

<?php
$a = $b = $c = "";

$a = exec("dir *", $b, $c);

var_dump($a, $b, $c);
?>

When I open it in the browser, a shell window opens for a second and disappears after the command has finished executing.

I haven't seen this behavior with manual installations of PHP both as an Apache module and CGI.

Is there anything that I can change to prevent the shell window from opening?

Thanks,
Razvan

PostPosted: 16. March 2007 17:04
by Wiedmann
Is there anything that I can change to prevent the shell window from opening?

Start Apache as a Windows service (without desktop interaction) and not as a application.

PostPosted: 16. March 2007 17:18
by rracasanu
Hello,

Indeed this has solved the problem.

Thank you,
Razvan