mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:04:53 +01:00
* PHP: fix not starting Apache after adding apc.shm_size, caused by old APC version 3.1 (eg. in Debian6) using a shm_size in MB without unit
This commit is contained in:
parent
f6ec2dc563
commit
24f8117c6b
@ -866,8 +866,7 @@ function check_fix_php_apc_ini()
|
||||
file_exists($path = $matches[1]) && ($apc_ini = file_get_contents($path)))
|
||||
{
|
||||
$new_shm_size = 128 / $shm_segments;
|
||||
$new_shm_size .= 'M';
|
||||
if ($numeric_size) $new_shm_size = _size_with_unit ($new_shm_size);
|
||||
if (!$numeric_size) $new_shm_size .= 'M';
|
||||
if (preg_match('|^apc.shm_size\s*=\s*(\d+[KMG]?)$|m', $apc_ini))
|
||||
{
|
||||
file_put_contents($path, preg_replace('|^apc.shm_size\s*=\s*(\d+[KMG]?)$|m', 'apc.shm_size='.$new_shm_size, $apc_ini));
|
||||
|
Loading…
Reference in New Issue
Block a user