From ab346e30be6200a5d0d413d8552862066adf9716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=C3=A7i?= Date: Wed, 23 Jul 2008 16:19:50 +0000 Subject: Disable apc on machines with less than 96 MB to make they behave better. --- etc/rc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'etc/rc') diff --git a/etc/rc b/etc/rc index 0297552..a2882a8 100755 --- a/etc/rc +++ b/etc/rc @@ -251,7 +251,6 @@ extension_dir=/usr/local/lib/php/20060613/ ; add additional extensions below ; standard PHP extension -extension=apc.so extension=pcre.so extension=bz2.so extension=bcmath.so @@ -288,14 +287,25 @@ extension=zlib.so ;xdebug.remote_port = 17869 ;xdebug.idekey = devphp +EOF + +RAM=`sysctl hw.realmem | awk '{print $2/1000000}' | awk -F '.' '{print $1}'` +export RAM +if [ $RAM -gt 96 ]; then + +cat >>/usr/local/lib/php.ini <