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

PHP-FPM PHP Startup Warning

Discussion in 'Install & Upgrades or Pre-Install Questions' started by coldice, Dec 10, 2017.

  1. coldice

    coldice Member

    35
    1
    8
    Nov 27, 2017
    India
    Ratings:
    +2
    Local Time:
    12:33 AM
    1.13.7
    10.1.29
    When I enter nprestart I get this warning:
    Code:
     NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/mcrypt.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20131226/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0
     done
    
    I run php -v and got the same message.

    Did I messed up in centmin mod?

    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 6.9 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.13.7
    • PHP Version Installed: 5.6.32
    • MariaDB MySQL Version Installed:
      mysql Ver 15.1 Distrib 10.1.29-MariaDB, for Linux (x86_64) using readline 5.1

    • Persistent Config: cat /etc/centminmod/custom_config.inc:
      Code:
      LETSENCRYPT_DETECT='y'
      


     
  2. eva2000

    eva2000 Administrator Staff Member

    50,891
    11,791
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,246
    Local Time:
    5:03 AM
    Nginx 1.25.x
    MariaDB 10.x
    fresh install ? might be related to changes i made for php 7.2 deprecated mcrypt

    Troubleshooting Initial Install



    To troubleshoot initial installation, you need to check the initial install log at /root/centminlogs and instructions under Sharing logs and errors heading for using Pastebin.com or Gists to share a sanitised version of the contents of the initial install log. You can see full details at How to troubleshoot Centmin Mod initial install issues

    Example list /root/centminlogs files in date ascending order and grep for install.log
    Code (Text):
    ls -lahrt /root/centminlogs | grep install.log
    

    example output returns install log at /root/centminlogs/centminmod_1.2.3-eva2000.09.001_111016-112321_install.log
    Code (Text):
    ls -lahrt /root/centminlogs | grep install.log
    -rw-r--r--  1 root root 2.2M Oct 11 01:40 centminmod_1.2.3-eva2000.09.001_111016-112321_install.log
    

    in SSH use cat to ouput contents of /root/centminlogs/centminmod_1.2.3-eva2000.09.001_111016-112321_install.log. Clear your SSH client window/buffer so only output is the contents of the file
    Code (Text):
    cat /root/centminlogs/centminmod_1.2.3-eva2000.09.001_111016-112321_install.log
    

    Then copy and paste into Pastebin.com or Gists entry. If your SSH window scroll buffer isn't that large to get the whole contents of the install log, you can download file manually and copy and paste contents. But makes sure it's sanitised version of the contents of the initial install log as outlined at How to troubleshoot Centmin Mod initial install issues
     
  3. eva2000

    eva2000 Administrator Staff Member

    50,891
    11,791
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,246
    Local Time:
    5:03 AM
    Nginx 1.25.x
    MariaDB 10.x
    at anytime did you upgrade to PHP 7.2.0 and downgrade again ?
     
  4. coldice

    coldice Member

    35
    1
    8
    Nov 27, 2017
    India
    Ratings:
    +2
    Local Time:
    12:33 AM
    1.13.7
    10.1.29
  5. eva2000

    eva2000 Administrator Staff Member

    50,891
    11,791
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,246
    Local Time:
    5:03 AM
    Nginx 1.25.x
    MariaDB 10.x
    Update your local 123.09beta01 code via centmin.sh menu option 23 submenu option 2 or cmupdate command and then exit centmin.sh and re-run centmin.sh and re-try php update to 7.1.12 via centmin.sh menu option 5

    Upgrading Centmin Mod Code to Latest Version



    Getting Started Guide step 19 outlines also how to keep Centmin Mod code updated or how to switch version branches or you can run cmupdate command that was recently added.

    Centmin Mod LEMP stack's script code is constantly updated for improvements, bug fixes and security fixes so keeping the Centmin Mod code up to date is important. With Centmin Mod 1.2.3-eva2000.08) (123.08stable) and higher releases, a newly added centmin.sh menu option 23 allows much easier code updates and version branch swicthing via Git backed environment you can setup. For full details read the following links:
     
  6. coldice

    coldice Member

    35
    1
    8
    Nov 27, 2017
    India
    Ratings:
    +2
    Local Time:
    12:33 AM
    1.13.7
    10.1.29
    I've upgraded my php to 7 and now mcrypt.so is not coming anymore but a new error is coming for ioncube as stated in this thread:
    How to increase WP Memory Limit?
     
  7. eva2000

    eva2000 Administrator Staff Member

    50,891
    11,791
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,246
    Local Time:
    5:03 AM
    Nginx 1.25.x
    MariaDB 10.x
    answered in other thread
     
  8. JoeDer

    JoeDer Member

    82
    19
    8
    Feb 22, 2015
    Ratings:
    +48
    Local Time:
    9:03 PM
    Nginx 1.21.x
    MariaDB 10.3.x
    I have similar issue with PHP after the upgrade to 7.1.12 from 5.6.32 on a fresh CentminMod install.
    When I try to restart PHP (fpmrestart) or even to see PHP vresion (php -v) I get this error?

    Code:
    Gracefully shutting down php-fpm . done
    Starting php-fpm [14-Dec-2017 13:10:19] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20160303/mailparse.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20160303/mailparse.so: cannot open shared object file: No such file or directory in Unknown on line 0
    [14-Dec-2017 13:10:19] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20160303/redis.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20160303/redis.so: cannot open shared object file: No such file or directory in Unknown on line 0
     done
    • CentOS: 7-4.1708.el7.centos.x86_64
    • Centmin Mod: 123.09beta01
    • Nginx: 1.13.7
    • PHP: 7.1.12
    • MariaDB: 10.1.29
    • Persistent Config: cat /etc/centminmod/custom_config.inc:
    Code:
    NGINX_IPV='y'
    NGINX_MP4='y'
    NGINX_WEBDAV='y'
    LETSENCRYPT_DETECT='y'
    Install Log

    Could you please help me to solve it?
     
  9. eva2000

    eva2000 Administrator Staff Member

    50,891
    11,791
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,246
    Local Time:
    5:03 AM
    Nginx 1.25.x
    MariaDB 10.x
    • What version of Centmin Mod ? 123.08stable or 123.09beta01 ? Was it fresh install or upgrade ? How long ago did you install Centmin Mod ? There's numerous code changes, bug fixes over time, so ensure you have latest Centmin Mod code installed by upgrading your Centmin Mod code as instructed below.
    • 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 ]
    
     
  10. JoeDer

    JoeDer Member

    82
    19
    8
    Feb 22, 2015
    Ratings:
    +48
    Local Time:
    9:03 PM
    Nginx 1.21.x
    MariaDB 10.3.x
    It was a fresh installation of 123.09beta01 with the curl onliner installer method at 13/Dec/2017.
    The PHP where installed as default was the 5.6.32 and I upgraded it to 7.1.12 (with dev tools) immediately after the fresh Centmin Mod installation.

    Should I delete the relevant *.ini files for the PHP extensions (mailparse.so & redis.so) and then recompile PHP?
     
  11. eva2000

    eva2000 Administrator Staff Member

    50,891
    11,791
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,246
    Local Time:
    5:03 AM
    Nginx 1.25.x
    MariaDB 10.x
    yes try that
     
  12. JoeDer

    JoeDer Member

    82
    19
    8
    Feb 22, 2015
    Ratings:
    +48
    Local Time:
    9:03 PM
    Nginx 1.21.x
    MariaDB 10.3.x
    Thank you @eva2000 my issue has been solved!

    I've delete these 2 .ini files (mailparse.ini & redis.ini) and after the recompile of PHP I saw 2 new .ini files, then, I've restart the PHP-FPM and the result was the normal output without any warning.

    You're great :)
     
  13. eva2000

    eva2000 Administrator Staff Member

    50,891
    11,791
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,246
    Local Time:
    5:03 AM
    Nginx 1.25.x
    MariaDB 10.x
    excellente :D
     
  14. pamamolf

    pamamolf Well-Known Member

    4,028
    421
    83
    May 31, 2014
    Ratings:
    +817
    Local Time:
    9:03 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    If I install Redis and from menu 13 the php extension does Centminmod will take care them when I update/upgrade the php ?

    Should I get a prompt when needed like imagick to reinstall redis php extension from menu?
     
  15. eva2000

    eva2000 Administrator Staff Member

    50,891
    11,791
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,246
    Local Time:
    5:03 AM
    Nginx 1.25.x
    MariaDB 10.x
    redis php extension is by default installed with 123.09beta01 regardless if redis server is installed

    but yes centmin.sh menu option 5 for php update will auto reinstall redis php extension each time
     
  16. pamamolf

    pamamolf Well-Known Member

    4,028
    421
    83
    May 31, 2014
    Ratings:
    +817
    Local Time:
    9:03 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Can i keep that disable as i do not need to use Redis for Nginx and keep using Redis for the rest with no issues?

    Code:
    NGINX_HTTPREDIS='n'
     
  17. eva2000

    eva2000 Administrator Staff Member

    50,891
    11,791
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,246
    Local Time:
    5:03 AM
    Nginx 1.25.x
    MariaDB 10.x
    Yes you can if you don't need redis nginx module