From cddedb4083488a8d93b9bcbd18c47db8b1a1ae3e Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 30 Jul 2010 20:11:08 -0400 Subject: Ensure apc is disabled by setting to 0. Also enable suhosin php support for < 65 megabytes of ram, too --- etc/rc.php_ini_setup | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'etc/rc.php_ini_setup') diff --git a/etc/rc.php_ini_setup b/etc/rc.php_ini_setup index 870db1c..eaaac6f 100755 --- a/etc/rc.php_ini_setup +++ b/etc/rc.php_ini_setup @@ -43,6 +43,12 @@ fi # Calculate APC SHM size according # to detected memory values +if [ "$AVAILMEM" -lt "65" ]; then + APCSHMEMSIZE="1" +fi +if [ "$AVAILMEM" -lt "96" ]; then + APCSHMEMSIZE="10" +fi if [ "$AVAILMEM" -lt "128" ]; then APCSHMEMSIZE="10" fi @@ -192,6 +198,27 @@ done # Get amount of ram installed on this system RAM=`sysctl hw.realmem | awk '{print $2/1000000}' | awk -F '.' '{print $1}'` export RAM +if [ $RAM -lt 65 ]; then + cat >>/usr/local/lib/php.ini <>/usr/local/lib/php.ini <