Learn about Centmin Mod LEMP Stack today
Become a Member

PHP-FPM xcache installation gotcha

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by RPGX, Aug 15, 2014.

  1. RPGX

    RPGX New Member

    26
    4
    3
    Aug 14, 2014
    Ratings:
    +4
    Local Time:
    9:30 AM
    Nginx 1.9.15
    MariaDB 5.5.50
    When I installed xcache, the .ini file was not loading as expected.

    It took me quite some time to figure out that there should be an ini file in
    /root/centminmod/php.d/, and that I should copy it from the files at
    centmin-v1.2.3mod/config/xcache.

    Perhaps I missed an instruction set, but I did look for one. I hope this will help someone else spend less time on the same problem.

     
  2. eva2000

    eva2000 Administrator Staff Member

    54,106
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,738
    Local Time:
    12:30 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Actually, starting with .07 stable the location should be /etc/centmimod/php.d and Xcache install should automatically place xcache.ini there during install via the centmin.sh menu option 8. Did you use menu option 8 to install Xcache or menu option 6 to reinstall Xcache ?

    Code:
    --------------------------------------------------------
    Centmin Mod 1.2.3-eva2000.07 - http://centminmod.com
    --------------------------------------------------------
                       Centmin Mod Menu                  
    --------------------------------------------------------
    1).  Centmin Install
    2).  Add Nginx vhost domain
    3).  NSD setup domain name DNS
    4).  Nginx Upgrade / Downgrade
    5).  PHP Upgrade / Downgrade
    6).  XCache Re-install
    7).  APC Cache Re-install
    8).  XCache Install
    9).  APC Cache Install
    10). Memcached Server Re-install
    11). MariaDB 5.2, 5.5, 10 Upgrade Sub-Menu
    12). Zend OpCache Install/Re-install
    13). Install ioping.sh vbtechsupport.com/1239/
    14). SELinux disable
    15). Install/Re-install ImageMagick PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: pigz,pbzip2,lbzip2,p7zip etc
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Re-install
    21). Update - Nginx + PHP-FPM + Siege
    22). Exit
    --------------------------------------------------------
    Enter option [ 1 - 22 ]
    --------------------------------------------------------
    see change log Change Log Centmin Mod - Menu based Nginx installer for CentOS servers

     
  3. RPGX

    RPGX New Member

    26
    4
    3
    Aug 14, 2014
    Ratings:
    +4
    Local Time:
    9:30 AM
    Nginx 1.9.15
    MariaDB 5.5.50
    I am using .07, and after pulling the updated version I upgraded nginx to most recent and php to 5.3.29.

    For xcache: first I did 'install', then as I was having trouble, I tried 're-install'.

    I'm somewhat confused now -- I see an ini file where you indicate at
    /etc/centminmod/php.d/xcache.ini, but I'm not confident that php and xcache were using this file at the time, as I was having authorization clashes and did not resolve them until I turned off
    xcache.admin.enable_auth in /root/centminmod/php.d/xcache.ini.

    Now, when I check my xcache admin page, the variable xcache.count is the same as that set in
    /etc/centminmod/php.d/xcache.ini and not what I set it to in /root/centminmod/php.d/xcache.ini, so it looks like /etc/centminmod/php.d/xcache.ini loaded that file this time.

    I realise that I am making it very hard to help me. I appreciate you taking the time to point out the current location of the files, and I will keep on eye on what's going on.

    My /root/centminmod/php.d directory has a number of ini files in it -- are you suggesting that this directory can now be removed?
     
  4. eva2000

    eva2000 Administrator Staff Member

    54,106
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,738
    Local Time:
    12:30 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    What happened is .06 used /root/centminmod/php.d and .07 uses /etc/centminmod/php.d. So .07 auto detects if previous .06 and lower versions use /root/centminmod/php.d and automatically copy all existing /root/centminmod/php.d/* files to /etc/centminmod/php.d. So what you end up with is PHP-FPM working from /etc/centminmod/php.d.

    So yes you can now delete /root/centminmod/php.d :)
     
  5. Manoj malviya

    Manoj malviya New Member

    19
    1
    3
    Dec 21, 2019
    Ratings:
    +1
    Local Time:
    8:00 PM
    1.17.6
    10.3.20
    When I install xcache i got this issue

    php -version

    PHP Warning: PHP Startup: Unable to load dynamic library 'xcache.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20180731/xcache.so (/usr/local/lib/php/extensions/no-debug-non-zts-20180731/xcache.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20180731/xcache.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20180731/xcache.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP 7.3.13 (cli) (built: Dec 25 2019 11:07:25) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.13, Copyright (c) 1998-2018 Zend Technologies
     
  6. eva2000

    eva2000 Administrator Staff Member

    54,106
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,738
    Local Time:
    12:30 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yeah xcache hasn't been updated in years and has less performance than default Zend Opcache, so to be honest I'd stick with default Zend Opcache for performance and better compatibility with PHP 7+
     
  7. pamamolf

    pamamolf Premium Member Premium Member

    4,074
    427
    83
    May 31, 2014
    Ratings:
    +833
    Local Time:
    4:30 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    What about removing it from the Centminmod stack ? :)
     
  8. eva2000

    eva2000 Administrator Staff Member

    54,106
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,738
    Local Time:
    12:30 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yeah honestly thinking about that and free up some centmin.sh menu options :)