Join the community today
Become a Member

PHP-FPM Unable to load dynamic library 'mailparse.so'

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by rc112, Feb 25, 2018.

Tags:
  1. rc112

    rc112 Member

    124
    14
    18
    Sep 22, 2017
    Ratings:
    +15
    Local Time:
    11:50 PM
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit ?
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: i.e. 1.11.10
    • PHP Version Installed: PHP 7.3.0 dev
    • MariaDB MySQL Version Installed: i.e. 10.0.21 or 10.1.21
    • When was last time updated Centmin Mod code base ? : i.e. run centmin.sh menu option 23 submenu option 2


    • Hi I got the error while upgrade php version to 7.3.0 dev as well as run php -v. I tried to upgrade again but still the same error. Cannot find what is going wrong. Please Kindly advice how to proceed. Thanks.

      Code:
      Install which version of PHP? (version i.e. 5.6.33, 7.0.26, NGDEBUG)
      PHP 7.x/7.1.x/7.2.x is GA Stable but still may have broken PHP extensions.
      NGDEBUG is PHP 7.3.0 dev builds minus incompatible PHP extensions
      ----------------------------------------------------------------
      Enter PHP Version number you want to upgrade/downgrade to: NGDEBUG
      ----------------------------------------------------------------
      existing php.ini will be backed up at /usr/local/lib/php.ini-oldversion_250218-104040
      ----------------------------------------------------------------
      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
      Downloading PHP NGDEBUG from https://git.php.net/repository/php-src.git
      Cloning into 'php-NGDEBUG'...
     
  2. eva2000

    eva2000 Administrator Staff Member

    37,267
    8,145
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,538
    Local Time:
    1:50 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    if you play with dev builds of php there is high chance some php extensions are not yet supported so need to accept that it won't work and delete their corresponding .ini settings file

    the command below lists all custom PHP extensions' ini file paths for extensions added by Centmin Mod specifically
    Code (Text):
    php --ini


    find the mailparse.ini path file and edit it and comment out the extension load line or delete the mailparse.ini and restart PHP-FPM service

    example
    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/mongodb.ini,
    /etc/centminmod/php.d/redis.ini,
    


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

    or with command shortcut
    Code (Text):
    fpmrestart
     
    • Agree Agree x 1
  3. rc112

    rc112 Member

    124
    14
    18
    Sep 22, 2017
    Ratings:
    +15
    Local Time:
    11:50 PM
    Thank you so much. Problem solved.

    It occurred to me how to know which version I should go with have best compatibility and performance? I think the latest will have the best performance boost but maybe more backward compatibility issue? Thank you @eva2000
     
  4. Jon Snow

    Jon Snow Active Member

    386
    61
    28
    Jun 30, 2017
    Ratings:
    +92
    Local Time:
    11:50 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    I recommend 7.1.x.

    I think some people here use 7.2.x fine as well, but it's best to stay away from dev builds on live sites.
     
    • Like Like x 1
  5. rc112

    rc112 Member

    124
    14
    18
    Sep 22, 2017
    Ratings:
    +15
    Local Time:
    11:50 PM
    @Jon Snow Thank you for your advice. That makes full sense. As the other member in the forum said "it is not easy to be a system admin", there is too much to learn. :D
     
..