Using PHP to launch more PHP scripts and use WinCache.
am 13.04.2010 14:49:16 von Richard QuadlingHello.
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 ...
// 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
// 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.
// controller.php
// Set the ucache values
// Launch child tasks
// Loop, reporting child values
?>
//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
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php