forked from extern/egroupware
using PHP_BINARY constant instead of - sometimes not set - $_SERVER['_']
This commit is contained in:
parent
be93c24def
commit
6b2501430e
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/php -qC
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* API - run Timed Asynchron Services for all EGroupware domain/instances
|
* API - run Timed Asynchron Services for all EGroupware domain/instances
|
||||||
@ -8,17 +8,15 @@
|
|||||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||||
* @package api
|
* @package api
|
||||||
* @access public
|
* @access public
|
||||||
* @version $Id$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$path_to_egroupware = realpath(__DIR__.'/..'); // need to be adapted if this script is moved somewhere else
|
$path_to_egroupware = realpath(__DIR__.'/..'); // need to be adapted if this script is moved somewhere else
|
||||||
$php = isset($_ENV['_']) ? $_ENV['_'] : $_SERVER['_'];
|
|
||||||
|
|
||||||
foreach(file($path_to_egroupware. '/header.inc.php') as $line)
|
foreach(file($path_to_egroupware. '/header.inc.php') as $line)
|
||||||
{
|
{
|
||||||
if(preg_match("/GLOBALS\['egw_domain']\['(.*)']/", $line, $matches))
|
if(preg_match("/GLOBALS\['egw_domain']\['(.*)']/", $line, $matches))
|
||||||
{
|
{
|
||||||
// -d memory_limit=-1 --> no memory limit
|
// -d memory_limit=-1 --> no memory limit
|
||||||
system($php. ' -q -d memory_limit=-1 '.$path_to_egroupware.'/api/asyncservices.php '. $matches[1]);
|
system(PHP_BINARY. ' -q -d memory_limit=-1 '.$path_to_egroupware.'/api/asyncservices.php '. $matches[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user