Discover Centmin Mod today
Register Now

CentOS7 + PHP7 extensions

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

  1. Sean

    Sean New Member

    16
    2
    3
    Oct 23, 2015
    Ratings:
    +8
    Local Time:
    9:58 AM
    1.8
    not using Maria yet
    Hi,

    Does anyone have a config where all the extensions work with php7 out of the box? I fresh installed yesterday and all the cache extensions are dead with php 7.1.4.

    Thanks
    Sean



    Please fill in any relevant information that applies to you:
    • CentOS Version: i.e. CentOS 7 64bit ?
    • Centmin Mod Version Installed: i.e. 123.08stable
    • Nginx Version Installed: i.e. 1.11.10
    • PHP Version Installed: i.e. 7.1.4
    • MariaDB MySQL Version Installed: NA
    • When was last time updated Centmin Mod code base ? : Brand new install
    • Persistent Config: Do you have any persistent config file options set in /etc/centminmod/custom_config.inc ? You can check via this command:

      cat /etc/centminmod/custom_config.inc


      Post output in CODE tags.


     
  2. eva2000

    eva2000 Administrator Staff Member

    54,895
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    11:58 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Read official php page yet at PHP-FPM - CentminMod.com LEMP Nginx web stack for CentOS ? and Centmin Mod Configuration Files - CentminMod.com LEMP Nginx web stack for CentOS

    It could be that 123.08stable is out of date for PHP 7.1 compatibility too, as only been testing PHP 7.1 with 123.09beta01 and higher.

    how are you verifying and checking whether php extensions are dead ?

    List all loaded php extensions via command
    Code (Text):
    php -m
    

    Any custom php extensions installed via source compile list there .ini settings files via
    Code (Text):
    php --ini
    


    example
    Code (Text):
    php -m
    [PHP Modules]
    bcmath
    bz2
    calendar
    Core
    ctype
    curl
    date
    dom
    enchant
    exif
    filter
    ftp
    gd
    geoip
    gettext
    gmp
    hash
    iconv
    igbinary
    imagick
    imap
    intl
    json
    ldap
    libxml
    mailparse
    mbstring
    mcrypt
    memcache
    memcached
    mysqli
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    pdo_sqlite
    Phar
    posix
    pspell
    readline
    redis
    Reflection
    session
    shmop
    SimpleXML
    snmp
    soap
    sockets
    SPL
    sqlite3
    standard
    sysvmsg
    sysvsem
    sysvshm
    tidy
    tokenizer
    xml
    xmlreader
    xmlrpc
    xmlwriter
    xsl
    Zend OPcache
    zip
    zlib
    
    [Zend Modules]
    Zend OPcache
    


    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
    
     
  3. eva2000

    eva2000 Administrator Staff Member

    54,895
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    11:58 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  4. Sean

    Sean New Member

    16
    2
    3
    Oct 23, 2015
    Ratings:
    +8
    Local Time:
    9:58 AM
    1.8
    not using Maria yet
    Eva2000,

    Here's my php -m with all the warts

    php -m
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20160303/memcache.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20160303/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20160303/memcached.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20160303/memcached.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20160303/xcache.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20160303/xcache.so: cannot open shared object file: No such file or directory in Unknown on line 0
    [PHP Modules]
    bcmath
    bz2
    calendar
    Core
    ctype
    curl
    date
    dom
    enchant
    exif
    filter
    ftp
    gd
    geoip
    gettext
    gmp
    hash
    iconv
    igbinary
    imap
    intl
    json
    ldap
    libxml
    mbstring
    mcrypt
    mysqli
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    pdo_sqlite
    Phar
    posix
    pspell
    readline
    Reflection
    session
    shmop
    SimpleXML
    snmp
    soap
    sockets
    SPL
    sqlite3
    standard
    sysvmsg
    sysvsem
    sysvshm
    tidy
    tokenizer
    xml
    xmlreader
    xmlrpc
    xmlwriter
    xsl
    zip
    zlib

    [Zend Modules]
     
  5. eva2000

    eva2000 Administrator Staff Member

    54,895
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    11:58 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    try centmin.sh menu option 10 to recompile memcache* php extensions if that doesn't work on 123.08stable, then you'd need to switch to 123.09beta01 as that 100% works for php 7.1 and memcache* php extenions

    xcache no idea, as zend opcache is best for caching so best to recompile php via centmin.sh menu option 5 and answer yes to zend opcache compile prompt.