Re: PHP-Apache-W98, executing external program. problem

From: Date: Thu, 23 Nov 2000 11:36:52 +0000
Subject: Re: PHP-Apache-W98, executing external program. problem
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-4072@lists.php.net to get a copy of this message
I have found the solution for this problem and it is really silly. The only thing one has to do is to make a batch file (.bat) which has the program to be executed, included. Then put the following in your php script. <?php $dum=popen("file.bat", 'r'); ... ... ... sleep(10); # where 10 is number of seconds to wait. $res=pclose($dum); ?> the number of seconds to wait depends on how long it takes to execute the command in the batch file. Incredably easy and silly programming. Thanks to all of you contributing to this problem. Helgi Jónsson "Helgi Jónsson" <helgijon@hi.is> wrote in message news:8vh2qq$sbf$1@toye.p.sourceforge.net... > Hi there, I seem to be doing everything the hard way. > > I am running PHP with Apache on w98 platform. > The problem at hand is that I need to execute external program from PHP > without waiting for the external program to finish. All solutions, that I > have seen are for Linux and Unix, which are farely simple. > > Normally you would want to wait for the external program to finish the work, > but this one takes from minutes up to weeks to finish. Therefore I need to > execute the external program and leave it running in the background. > > Please advice. > Helgi Jónsson > helgijon@hi.is > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.windows (#4072) next »