From 5436d37a265f584ce2543ce566b4e694a97bff73 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Thu, 20 Aug 2015 07:36:38 -0300 Subject: Replace pecl-APC by php55-opcache, ticket #4744 --- etc/rc.php_ini_setup | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/etc/rc.php_ini_setup b/etc/rc.php_ini_setup index 76c6d75..0ee5296 100755 --- a/etc/rc.php_ini_setup +++ b/etc/rc.php_ini_setup @@ -27,7 +27,7 @@ # Set our operating platform PLATFORM=`/bin/cat /etc/platform` -MIN_REALMEM_FOR_APC=512 +MIN_REALMEM_FOR_OPCACHE=512 if [ -d /usr/local/lib/php/20121212 ]; then EXTENSIONSDIR="/usr/local/lib/php/20121212/" @@ -55,28 +55,28 @@ REALMEM=`/sbin/sysctl hw.realmem | /usr/bin/awk '{print $2/1048576}' | /usr/bin/ export REALMEM export LOWMEM -if [ ${REALMEM} -lt $MIN_REALMEM_FOR_APC ]; then +if [ ${REALMEM} -lt $MIN_REALMEM_FOR_OPCACHE ]; then LOWMEM="TRUE" - echo ">>> Under $MIN_REALMEM_FOR_APC megabytes of ram detected. Not enabling APC." - echo ">>> Under $MIN_REALMEM_FOR_APC megabytes of ram detected. Not enabling APC." | /usr/bin/logger -p daemon.info -i -t rc.php_ini_setup + echo ">>> Under $MIN_REALMEM_FOR_OPCACHE megabytes of ram detected. Not enabling opcache" + echo ">>> Under $MIN_REALMEM_FOR_OPCACHE megabytes of ram detected. Not enabling opcache" | /usr/bin/logger -p daemon.info -i -t rc.php_ini_setup else - # Calculate APC SHM size according + # Calculate opcache memory size according # to detected memory values if [ "$AVAILMEM" -gt "135" ]; then - APCSHMEMSIZE="10M" + OPCACHEMEMSIZE="10" fi if [ "$AVAILMEM" -gt "256" ]; then - APCSHMEMSIZE="20M" + OPCACHEMEMSIZE="20" fi if [ "$AVAILMEM" -gt "384" ]; then - APCSHMEMSIZE="25M" + OPCACHEMEMSIZE="25" fi if [ "$AVAILMEM" -gt "512" ]; then - APCSHMEMSIZE="30M" + OPCACHEMEMSIZE="30" fi if [ "$AVAILMEM" -gt "784" ]; then - APCSHMEMSIZE="50M" + OPCACHEMEMSIZE="50" fi fi @@ -91,7 +91,7 @@ fi # be done automatically by the script below. PHPMODULES="standard" if [ "$LOWMEM" != "TRUE" ]; then - PHPMODULES="$PHPMODULES apc" + PHPMODULES="$PHPMODULES opcache" fi # Config read/write PHPMODULES="$PHPMODULES xml libxml dom" @@ -274,10 +274,10 @@ if [ "$LOWMEM" != "TRUE" ]; then /bin/cat >>/usr/local/lib/php.ini <