Very late answer, but I was working on this myself and found that it is indeed possible to run a GUI program from PHP with the Apache server on Windows XP.
- Start->Run, type "services.msc" to bring up Services control (other ways to get there, this is easiest IMO)
- Locate your Apache service (mine was called "wampapache" using WampServer 2.0)
- Open the service properties (double-click or right click->properties)
- Flip to the Log On account and ensure the checkbox titled "Allow service to interact with Desktop" is checked
- Flip back to the General tab, stop the service, start the service
Now, using the code below, you can spawn UI processes from PHP. In the first code snippet, the script will not wait for the application to close; the second snippet waits for the program to close before continuing (blocking).
Do not wait for application:
pclose(popen("start /B notepad.exe", "r"));
Wait for application:
system('start notepad.exe');
This has been tested on Windows XP. I have not tried it on any other Windows versions, your millage may vary.
Side note
On my particular installation, I was using the other option in the Log In tab of the service - Apache was running as a domain user so it could access several network shares with domain user permissions. The checkbox isn't available for that option, only when the service is running as Local System. After extensive research, I've found that there is simply no way for a single service to both interact with the current desktop AND utilize the credentials of a specific user. It's a one-or-the-other proposition, with the suggested remedy being to split your service into two components - one that uses the user account privs and one that interacts with the desktop. Not very practical when the service you're talking about is the web server. This note is probably pretty specific to my use case, but I wanted to put it out here in case I can save someone else the frustration in the future.