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

PHP-FPM Some Warning and notices when i try to restart php-fpm

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by R0rke, May 15, 2018.

  1. R0rke

    R0rke Member

    168
    22
    18
    Jun 2, 2016
    Iran
    Ratings:
    +37
    Local Time:
    10:48 PM
    2
    10
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: default
    • PHP Version Installed: 7.2.5
    • MariaDB MySQL Version Installed: default
    • When was last time updated Centmin Mod code base ? : about a week ago
    • Persistent Config: there is no custom config

    when i run :
    Code:
    Service php-fpm restart
    result :


    Code (Text):
     [14-May-2018 20:07:41] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'geoip.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20170718/geoip.so (/usr/local/lib/php/extensions/no-debug-non-zts-20170718/geoip.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20170718/geoip.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20170718/geoip.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    [14-May-2018 20:07:41] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'mailparse.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20170718/mailparse.so (/usr/local/lib/php/extensions/no-debug-non-zts-20170718/mailparse.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20170718/mailparse.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20170718/mailparse.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    [14-May-2018 20:07:41] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20170718/redis.so (/usr/local/lib/php/extensions/no-debug-non-zts-20170718/redis.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20170718/redis.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20170718/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    


    note : its restarting successfully but errors are annoying.
     
  2. eva2000

    eva2000 Administrator Staff Member

    53,567
    12,136
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,679
    Local Time:
    3:48 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    • What version of PHP used ? Did you upgrade or downgrade PHP recently ?
    • If you upgraded and you get some PHP warnings that some PHP extensions are unable to load, all you need to do is delete the relevant *.ini files for them and then reinstall if you require the PHP extension
    Example of error on restart PHP-FPM
    Code (Text):
    fpmrestart
    Gracefully shutting down php-fpm . done
    Starting php-fpm [06-Nov-2014 01:25:37] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20140815/geoip.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20140815/geoip.so: cannot open shared object file: No such file or directory in Unknown on line 0
    [06-Nov-2014 01:25:37] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20140815/igbinary.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20140815/igbinary.so: cannot open shared object file: No such file or directory in Unknown on line 0
    [06-Nov-2014 01:25:37] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20140815/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20140815/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
    [06-Nov-2014 01:25:37] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20140815/memcache.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20140815/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0
    [06-Nov-2014 01:25:37] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20140815/memcached.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20140815/memcached.so: cannot open shared object file: No such file or directory in Unknown on line 0
    done
    

    find the paths to the *.ini files
    Code (Text):
    php --ini 2>/devnull
    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/curlcainfo.ini,
    /etc/centminmod/php.d/custom_php.ini,
    /etc/centminmod/php.d/geoip.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,
    /etc/centminmod/php.d/zendopcache.ini
    

    delete ones that are reported as unable to load so if geoip.so, igbinary.so, imagick.so, memcache.so and memcached.so are reported as unable to load, remove their respective *.ini files
    Code (Text):
    rm -rf /etc/centminmod/php.d/geoip.ini
    rm -rf /etc/centminmod/php.d/igbinary.ini
    rm -rf /etc/centminmod/php.d/imagick.ini
    rm -rf /etc/centminmod/php.d/memcache.ini
    rm -rf /etc/centminmod/php.d/memcached.ini
    

    then restart PHP-FPM again
    Code (Text):
    fpmrestart
    Gracefully shutting down php-fpm . done
    Starting php-fpm  done
    

    Code (Text):
    php -v
    PHP 7.0.0-dev (cli) (built: Nov  6 2014 00:54:07)
    Copyright (c) 1997-2014 The PHP Group
    Zend Engine v2.8.0-dev, Copyright (c) 1998-2014 Zend Technologies
        with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
    


    Manually reinstall PHP extension



    For reported PHP extensions that do not load, i.e. "PHP Startup: Unable to load dynamic" and references PHPEXTENSIONNAME.so, some can be installed again via centmin.sh menu. For instance menu options 7, 9, 10, 12, 15, 18, and 19.

    for 123.08stable
    Code (Text):
    --------------------------------------------------------
    Centmin Mod 1.2.3-eva2000.08
    --------------------------------------------------------
                       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). Add Wordpress Nginx vhost + WP Super Cache
    23). Exit
    --------------------------------------------------------
    Enter option [ 1 - 23 ]
    --------------------------------------------------------
    


    for 123.09beta01 - menu options 7, 9, 10, 12, 13 (for redis), 15, 18, and 19 are relevant menu options that can be used only if the specific PHP extension is reporting as unable to load
    Code (Text):
    --------------------------------------------------------
         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 5.2/5.5 & 10.x Upgrade Sub-Menu
    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: 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 ]
    


    Some extensions will not recompile unless a major PHP version change is detected this is to save time as minor PHP version do not require recompile of those extensions. So you may do one of 2 steps
    1. need you to go from PHP 7.2.5 to 7.1.17 then back to 7.2.5 if after deleting *.ini file outlined above and centmin.sh menu option 5 doesn't recompile them or you can set.
    2. or easier is before centmin.sh menu option 5 PHP recompile, set in persistent config file /etc/centminmod/custom_config.inc add variable AUTODETECPHP_OVERRIDE='y'
     
  3. R0rke

    R0rke Member

    168
    22
    18
    Jun 2, 2016
    Iran
    Ratings:
    +37
    Local Time:
    10:48 PM
    2
    10
    i mention about it on start . its 7.2.5 / recently i do upgrade what should do exactly sorry im confuesd . i need to remove stuff or reinstall ?

    thanks
     
  4. eva2000

    eva2000 Administrator Staff Member

    53,567
    12,136
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,679
    Local Time:
    3:48 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
     
  5. R0rke

    R0rke Member

    168
    22
    18
    Jun 2, 2016
    Iran
    Ratings:
    +37
    Local Time:
    10:48 PM
    2
    10
    well i fixed memcache and redis error .
    but still have problem with :

    Code (Text):
    [15-May-2018 11:24:27] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'geoip.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20170718/geoip.so (/usr/local/lib/php/extensions/no-debug-non-zts-20170718/geoip.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20170718/geoip.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20170718/geoip.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    [15-May-2018 11:24:27] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'mailparse.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20170718/mailparse.so (/usr/local/lib/php/extensions/no-debug-non-zts-20170718/mailparse.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20170718/mailparse.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20170718/mailparse.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    


    i fix it by normally install redis and memcache in Centmin Menu Option 10 and 13
    i still need geoip and mailparse
     
  6. eva2000

    eva2000 Administrator Staff Member

    53,567
    12,136
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,679
    Local Time:
    3:48 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    did you do as post 5 outlined ?
     
  7. R0rke

    R0rke Member

    168
    22
    18
    Jun 2, 2016
    Iran
    Ratings:
    +37
    Local Time:
    10:48 PM
    2
    10
    no , because i don't want to recompile php right now .
     
  8. eva2000

    eva2000 Administrator Staff Member

    53,567
    12,136
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,679
    Local Time:
    3:48 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    that's only way right now
     
  9. R0rke

    R0rke Member

    168
    22
    18
    Jun 2, 2016
    Iran
    Ratings:
    +37
    Local Time:
    10:48 PM
    2
    10
    thank you will do it later and update the post...
     
  10. eva2000

    eva2000 Administrator Staff Member

    53,567
    12,136
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,679
    Local Time:
    3:48 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+