Get the most out of your Centmin Mod LEMP stack
Become a Member

PHP-FPM PHP 7.3.0 - Extensions Issue

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by leminhduong, Mar 2, 2019.

  1. leminhduong

    leminhduong New Member

    10
    2
    3
    Mar 2, 2019
    Việt Nam
    Ratings:
    +3
    Local Time:
    11:29 PM
    1.15.9
    MariaDB 10
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed:123.09beta01
    • Nginx Version Installed: 1.15.9
    • PHP Version Installed: i.e. 7.3
    • MariaDB MySQL Version Installed: 10.1.38-MariaDB
    • When was last time updated Centmin Mod code base ? : March, 2, 2019
    • Persistent Config: Do you have any persistent config file options set in
      Code (Text):
      NGXDYNAMIC_BROTLI='y'
      LETSENCRYPT_DETECT='y'
      
    PHP Extension errors:
    Code (Text):
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-zts-20180731/memcached.so' (tried: /usr/local/lib/php/extensions/no-debug-zts-20180731/memcached.so (/usr/local/lib/php/extensions/no-debug-zts-20180731/memcached.so: undefined symbol: executor_globals_id), /usr/local/lib/php/extensions/no-debug-non-zts-20180731//usr/local/lib/php/extensions/no-debug-zts-20180731/memcached.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20180731//usr/local/lib/php/extensions/no-debug-zts-20180731/memcached.so.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 'redis.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20180731/redis.so (/usr/local/lib/php/extensions/no-debug-non-zts-20180731/redis.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20180731/redis.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20180731/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    

    Menu option 10 did not fix the memcached error.
    File Log memcached /root/centminlogs
    memcached_reinstall.log

    leminhduong94/centminlogs
     
  2. Jimmy

    Jimmy Well-Known Member

    1,569
    321
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +810
    Local Time:
    12:29 PM
    1.15.x
    MariaDB 10.3.x
  3. eva2000

    eva2000 Administrator Staff Member

    41,080
    9,188
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,097
    Local Time:
    2:29 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    indeed looks like memcache (without d) php extension is failing on compiles and might have been for a while just existing working versions had memcache module already so even if it failed on current php compile it had a memcache module from previous successful compile masking the issue so when you restarted php or checked php --ri memcache it showed working. But fresh installs would show memcache module failed and that might have happened due to latest memcache php updates for 7.3 compatibility commited on February 28, 2019 so a few days ago websupport-sk/pecl-memcache. Will have to look into this. For now most modern web apps will use memcached php extension not failed memcache php extension so just temporarily disable loading memcache php extension

    type
    Code (Text):
    php --ini

    lists all custom php extensions settings ini file, find memcache.ini path at /etc/centminmod/php.d/memcache.ini and edit and comment out the extension load line with semi-colon in front
    Code (Text):
    ;extension=/usr/local/lib/php/extensions/no-debug-non-zts-20180731/memcache.so

    then restart php-fpm
    Code (Text):
    service php-fpm restart

    or command shortcut
    Code (Text):
    fpmrestart


    i see in error logs @leminhduong posted
    Code (Text):
    make: *** [php7/memcache.lo] Error 1
    make: *** Waiting for unfinished jobs....
    /svr-setup/memcache-php7/php7/memcache_pool.c:1650:21: error: conflicting types for ‘mmc_prepare_key_ex’
     MMC_POOL_INLINE int mmc_prepare_key_ex(const char *key, unsigned int key_len, char *result, unsigned int *result_len, char *prefix)  /* {{{ */
                        ^
    In file included from /svr-setup/memcache-php7/php7/memcache_pool.c:40:0:
    /svr-setup/memcache-php7/php7/memcache_pool.h:399:5: note: previous declaration of ‘mmc_prepare_key_ex’ was here
     int mmc_prepare_key_ex(const char *, unsigned int, char *, unsigned int *);
        ^
    make: *** [php7/memcache_pool.lo] Error 1
     ccache gcc -I/usr/local/include/php -I. -I/svr-setup/memcache-php7 -DPHP_ATOM_INC -I/svr-setup/memcache-php7/include -I/svr-setup/memcache-php7/main -I/svr-setup/memcache-php7 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /svr-setup/memcache-php7/php7/memcache_ascii_protocol.c  -fPIC -DPIC -o php7/.libs/memcache_ascii_protocol.o
    /bin/sh /svr-setup/memcache-php7/libtool --mode=compile ccache gcc -I/usr/local/include/php -I. -I/svr-setup/memcache-php7 -DPHP_ATOM_INC -I/svr-setup/memcache-php7/include -I/svr-setup/memcache-php7/main -I/svr-setup/memcache-php7 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /svr-setup/memcache-php7/php7/memcache.c -o php7/memcache.lo
     ccache gcc -I/usr/local/include/php -I. -I/svr-setup/memcache-php7 -DPHP_ATOM_INC -I/svr-setup/memcache-php7/include -I/svr-setup/memcache-php7/main -I/svr-setup/memcache-php7 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /svr-setup/memcache-php7/php7/memcache.c  -fPIC -DPIC -o php7/.libs/memcache.o
    /svr-setup/memcache-php7/php7/memcache.c: In function ‘php_mmc_store’:
    /svr-setup/memcache-php7/php7/memcache.c:643:4: error: too many arguments to function ‘mmc_prepare_key_ex’
       if (mmc_prepare_key_ex(ZSTR_VAL(key), ZSTR_LEN(key), request->key, &(request->key_len), MEMCACHE_G(key_prefix)) != MMC_OK) {
       ^
    In file included from /svr-setup/memcache-php7/php7/php_memcache.h:34:0,
                    from /svr-setup/memcache-php7/php7/memcache.c:30:
    /svr-setup/memcache-php7/php7/memcache_pool.h:399:5: note: declared here
     int mmc_prepare_key_ex(const char *, unsigned int, char *, unsigned int *);
        ^
    make: *** [php7/memcache.lo] Error 1
    
     
    • Like Like x 1
    • Informative Informative x 1
  4. eva2000

    eva2000 Administrator Staff Member

    41,080
    9,188
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,097
    Local Time:
    2:29 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    FYI @Jimmy @leminhduong submitted a bug report to memcache php extension dev as others also reported issues at websupport-sk/pecl-memcache

    bug report v4.0.1-php73 tagged failed on PHP 7.3.2 · Issue #38 · websupport-sk/pecl-memcache
     
    • Informative Informative x 1
  5. eva2000

    eva2000 Administrator Staff Member

    41,080
    9,188
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,097
    Local Time:
    2:29 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Just updated 123.09beta01 to rollback from memcache v4.0.1 to v3.0.9 + php 7.3 working patch temporarily so in 123.09beta01 run cmupdate to update 123.09beta01 code and then centmin.sh menu option 10 to recompile memcache/memcached extensions.

    example
    Code (Text):
    cmupdate
    Saved working directory and index state WIP on 123.09beta01: 01d312a pcre 8.43 in 123.09beta01
    HEAD is now at 01d312a pcre 8.43 in 123.09beta01
    remote: Enumerating objects: 10, done.
    remote: Counting objects: 100% (9/9), done.
    remote: Compressing objects: 100% (1/1), done.
    remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0
    Unpacking objects: 100% (4/4), done.
    From https://github.com/centminmod/centminmod
       01d312a..382f511  123.09beta01 -> origin/123.09beta01
    Updating 01d312a..382f511
    Fast-forward
     inc/memcached_install.inc | 3 +++
     1 file changed, 3 insertions(+)
    

    Code (Text):
    cmdir
     ./centmin.sh 
    
    --------------------------------------------------------
         Centmin Mod Menu 123.09beta01 centminmod.com     
    --------------------------------------------------------
    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 MySQL Upgrade & Management
    12). Zend OpCache Install/Re-install
    13). Install/Reinstall Redis PHP Extension
    14). SELinux disable
    15). Install/Reinstall ImagicK PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: zstd,pigz,pbzip2,lbzip2
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Install/Re-Install
    21). Update - Nginx + PHP-FPM + Siege
    22). Add Wordpress Nginx vhost + Cache Plugin
    23). Update Centmin Mod Code Base
    24). Exit
    --------------------------------------------------------
    Enter option [ 1 - 24 ] 10
    

    verify memcache php extension 3.0.9 with PHP 7.3 patch
    Code (Text):
    php --ri memcache
    
    memcache
    
    memcache support => enabled
    Version => 3.0.9-dev
    Revision => $Revision$
    
    Directive => Local Value => Master Value
    memcache.allow_failover => 1 => 1
    memcache.max_failover_attempts => 20 => 20
    memcache.default_port => 11211 => 11211
    memcache.chunk_size => 32768 => 32768
    memcache.protocol => ascii => ascii
    memcache.hash_strategy => consistent => consistent
    memcache.hash_function => crc32 => crc32
    memcache.redundancy => 1 => 1
    memcache.session_redundancy => 2 => 2
    memcache.compress_threshold => 20000 => 20000
    memcache.lock_timeout => 15 => 15
    
     
    • Like Like x 1
  6. leminhduong

    leminhduong New Member

    10
    2
    3
    Mar 2, 2019
    Việt Nam
    Ratings:
    +3
    Local Time:
    11:29 PM
    1.15.9
    MariaDB 10
    Thanks for giving me a lift to the station. You saved my life.