diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2010-07-30 20:17:48 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2010-07-30 20:17:48 -0400 |
commit | 8ee1dc80e7d0fa8e2b2486f9906c714a467e5698 (patch) | |
tree | 87f8bc28dec65beb66f633b8c72b945f88eb139d /etc | |
parent | 21a6662ca722a49d5194b5d9312397a149142984 (diff) | |
download | pfsense-8ee1dc80e7d0fa8e2b2486f9906c714a467e5698.zip pfsense-8ee1dc80e7d0fa8e2b2486f9906c714a467e5698.tar.gz |
Do not load apc module when under low memory situations
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/rc.php_ini_setup | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/etc/rc.php_ini_setup b/etc/rc.php_ini_setup index ee864e7..b1b7950 100755 --- a/etc/rc.php_ini_setup +++ b/etc/rc.php_ini_setup @@ -198,7 +198,9 @@ 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 97 ]; then +export LOWMEM +if [ "$RAM" -lt "97" ]; then + LOWMEM="TRUE" cat >>/usr/local/lib/php.ini <<EOF [suhosin] @@ -261,6 +263,16 @@ for EXT in $PHPMODULES; do SHOULDREMOVE="false" fi done + if [ "$LOWMEM" = "TRUE" ]; then + if [ "$EXT" = "apc" ]; then + SHOULDREMOVE="true" + fi + fi + if [ "$LOWMEM" = "TRUE" ]; then + if [ "$EXT" = "xcache" ]; then + SHOULDREMOVE="true" + fi + fi if [ "$SHOULDREMOVE" = "true" ]; then if [ -f "${EXTENSIONSDIR}${EXT}.so" ]; then echo ">>> ${EXT} did not load correctly. Removing from php.ini..." >> /var/run/php_modules_load_errors.txt |