diff options
author | Renato Botelho <renato@netgate.com> | 2015-08-20 07:36:38 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-08-20 07:36:38 -0300 |
commit | 5436d37a265f584ce2543ce566b4e694a97bff73 (patch) | |
tree | d574806c6eff2b9360fd2f433fab46cade92e422 /etc | |
parent | a621d101b827542d6b292735a0d7febd50530ab7 (diff) | |
download | pfsense-5436d37a265f584ce2543ce566b4e694a97bff73.zip pfsense-5436d37a265f584ce2543ce566b4e694a97bff73.tar.gz |
Replace pecl-APC by php55-opcache, ticket #4744
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/rc.php_ini_setup | 32 |
1 files 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 <<EOF -; APC Settings -apc.enabled="1" -apc.enable_cli="0" -apc.shm_size="${APCSHMEMSIZE}" +; opcache Settings +opcache.enabled="1" +opcache.enable_cli="0" +opcache.memory_consumption="${OPCACHEMEMSIZE}" EOF fi @@ -396,7 +396,7 @@ for EXT in $PHPMODULESLC; do done # Handle low memory situations if [ "$LOWMEM" = "TRUE" ]; then - if [ "$EXT" = "apc" ]; then + if [ "$EXT" = "opcache" ]; then SHOULDREMOVE="true" fi if [ "$EXT" = "xcache" ]; then |