Join the community today
Register Now

Disable APC for one site

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Francisco Esteves, Apr 30, 2015.

  1. Francisco Esteves

    Francisco Esteves New Member

    23
    2
    3
    Sep 4, 2014
    Ratings:
    +2
    Local Time:
    10:41 AM
    Hello,
    We have found a very strange problem with APC and one script so i need disable APC but only for 1 site no for entire server, anyway to do this?

    Thanks,
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,196
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    7:41 PM
    Nginx 1.13.x
    MariaDB 5.5
    @Francisco Esteves you can try similar approach to @nVidian for Zend Opcache PHP-FPM - Enable/Disable Zend Opcache per vhosts | Centmin Mod Community

    See PHP: Runtime Configuration - Manual and apc.filters setting PHP: Runtime Configuration - Manual

    Then try something like caching - how to exclude .php file from APC cache? - Stack Overflow Edit /etc/centminmod/php.d/apc.ini APC Cache ini file which you can find using php --ini command for all .ini PHP related file paths

    Code:
    php --ini
    Configuration File (php.ini) Path: /usr/local/lib
    Loaded Configuration File:         /usr/local/lib/php.ini
    Scan for additional .ini files in: /etc/centminmod/php.d
    Additional .ini files parsed:      /etc/centminmod/php.d/apc.ini,
    /etc/centminmod/php.d/igbinary.ini,
    /etc/centminmod/php.d/imagick.ini,
    /etc/centminmod/php.d/memcache.ini,
    /etc/centminmod/php.d/memcached.ini
    Edit apc.ini and add

    Code:
    apc.filters = "-/home/nginx/domains/newdomain.com/public/.*"
    restart PHP-FPM service

    Code:
    service php-fpm restart
    or

    Code:
    fpmrestart