php exec and black window

Problems with the Windows version of XAMPP, questions, comments, and anything related.

php exec and black window

Postby mikey__ » 31. January 2007 19:10

Hi,

using xampp + php as per the default install.

Trying to run a command line program using exec. Actually I have no
problem running the program, but nothing I do seems to stop it
briefly showing a black window for the process.

I've read a lot of discussion of this suggesting things like "start /b"
and "cmd /c", but nothing seems to make any difference.

The command lookds like

Code: Select all
exec("start /b c:/stuff/prog.exe < file.in > file.out 2> nul", $output);

prog.exe does not open any windows itself, but I always get the black
window appear and then disappear. The program runs correctly
each time it is executed.

Can anyone shed any authoritative light on this?

A few web articles suggested using php-win.exe for running php within
xampp, but I cannot figure out how to change this.

Many thanks for your help.

Mike
mikey__
 
Posts: 2
Joined: 31. January 2007 19:00

Postby Wiedmann » 31. January 2007 19:58

Actually I have no
problem running the program, but nothing I do seems to stop it
briefly showing a black window for the process.

Install and start Apache as Windows service.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Problem solved!

Postby mikey__ » 31. January 2007 20:08

Thank you soooooo much! :D

I just checked the svc button and restarted it and bam! no black
windows.

Is it possible to summarize what difference this makes to how
xampp/php works?

If not, no problem, you've saved my afternoon...

Mike
mikey__
 
Posts: 2
Joined: 31. January 2007 19:00


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 65 guests