Using PHP to launch more PHP scripts and use WinCache.

From: Date: Tue, 13 Apr 2010 12:49:16 +0000
Subject: Using PHP to launch more PHP scripts and use WinCache.
Groups: php.windows 
Request: Send a blank email to php-windows+get-30027@lists.php.net to get a copy of this message
Hello. I've been trying to use WinCache to allow me to pass data between 2 scripts, where script a launches script b. I can do this at the command line easily enough ... <?php // test1.php wincache_ucache_set('foobar', 'barfoo'); $a = wincache_ucache_get('foobar'); echo 'Entry in the cache is: ', $a; $handle = fopen ("php://stdin","r"); $line = fgets($handle); ?> and <?php // test2.php $a = wincache_ucache_get('foobar'); echo 'The entry from ucache is ', $a; $handle = fopen ("php://stdin","r"); $line = fgets($handle); ?> and running these ... start C:\PHP5\php.exe -f test1.php start C:\PHP5\php.exe -f test2.php Now I want to do something similar from a PHP script. <?php // controller.php // Set the ucache values // Launch child tasks // Loop, reporting child values ?> <?php //child // loop for a while, setting the ucache values for this child. ?> What I'm stuck with is how do I launch a PHP script so that it has the launching script as the parent process _AND_ does not block execution of the parent script. I can launch them as separate processes in any number of ways, but then the parent isn't known. Any suggestions? -- ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling

« previous php.windows (#30027) next »