[Phpwm] Using exec() on Windows

David Johnson dj at david-web.co.uk
Fri Mar 16 14:31:41 GMT 2007

Hi all,

I've had a complaint from someone using one of my PHP-based FLOSS projects 
(www.ethereye.org.uk, for the curious) under Apache on Windows, saying that a 
command prompt box is briefly appearing (on the server) for each call to 
exec() (my app runs multiple instances of ping when accessed).

Does anyone have a way to stop this from happening?

I've seen a few solutions suggested, but neither seem to make any difference. 
One was to execute 'start /B <mycommand>' rather than just '<mycommand>' and 
the other was to modify the web server service and disallow interaction with 
the desktop.
I also tried using the various alternatives to exec() (system(), etc.) but 
they all behave in exactly the same way.

Surely this is not some unkillable 'feature' of PHP on Windows?

Thanks in advance for any advice,

David Johnson

More information about the Phpwm mailing list