Learn about Centmin Mod LEMP Stack today
Register Now

Opcache Settings

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Jimmy, Apr 25, 2017.

  1. Jimmy

    Jimmy Premium Member Premium Member

    1,114
    247
    63
    Oct 24, 2015
    East Coast USA
    Ratings:
    +596
    Local Time:
    5:05 AM
    1.13.x
    MariaDB 10.1.x
    123.09beta01

    I was playing around with opcache and wanted to increase the memory.

    I went into phpedit and noticed that all the opcache settings have semi-colons. My current memory is 784MB. I was wondering where that was set, since the php.ini file is showing:
    Code:
    ; The OPcache shared memory storage size.
    ;opcache.memory_consumption=128
    Is there another file with the opcache settings?

    I'm assuming that I can just add new settings in the b_customphp.ini file?

    Thanks!
     
    Last edited: Apr 25, 2017
  2. pamamolf

    pamamolf Well-Known Member

    2,721
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    12:05 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Just use the command php --ini and then locate the zendopcache.ini

    Code:
    /etc/centminmod/php.d/zendopcache.ini
     
    • Like Like x 1
  3. Jimmy

    Jimmy Premium Member Premium Member

    1,114
    247
    63
    Oct 24, 2015
    East Coast USA
    Ratings:
    +596
    Local Time:
    5:05 AM
    1.13.x
    MariaDB 10.1.x
    Just what I was looking for! Thanks! :)

    Is this overwritten on a reinstall / upgrade? Can I put settings in the b_customphp.ini file
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,161
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    7:05 PM
    Nginx 1.13.x
    MariaDB 5.5
    zend opcache has it's own zendopcache.ini settings file /etc/centminmod/php.d/zendopcache.ini as per https://community.centminmod.com/threads/php-opcode-and-memcached-statistics-pages.1513/

    Code (Text):
    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/a_customphp.ini,
    /etc/centminmod/php.d/curlcainfo.ini,
    /etc/centminmod/php.d/geoip.ini,
    /etc/centminmod/php.d/igbinary.ini,
    /etc/centminmod/php.d/imagick.ini,
    /etc/centminmod/php.d/mailparse.ini,
    /etc/centminmod/php.d/memcache.ini,
    /etc/centminmod/php.d/memcached.ini,
    /etc/centminmod/php.d/redis.ini,
    /etc/centminmod/php.d/zendopcache.ini
    


    As per PHP-FPM - CentminMod.com LEMP Nginx web stack for CentOS order of php -ini listing is where priority of settings is set so you would need to create a file that is alphabetically after /etc/centminmod/php.d/zendopcache.ini i.e. /etc/centminmod/php.d/z_zendopcache.ini
     
    • Like Like x 2