Welcome to Centmin Mod Community
Become a Member

PHP-FPM you need to have the mcrypt php module installed.

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by jellday, Feb 15, 2016.

  1. jellday

    jellday Member

    83
    4
    8
    May 31, 2014
    Ratings:
    +11
    Local Time:
    9:17 PM
    1.4.6
    5.5
    One old working VPS, I did an upgrade using option 5.
    Now I get an error:
    To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.
    But I have the module installed:
    php -m

    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/imagick.so' - libMagickWand.so.2: cannot open shared object file: No such file or directory in Unknown on line 0
    [PHP Modules]
    apc
    bcmath
    bz2
    calendar
    Core
    ctype
    curl
    date
    dom
    enchant
    ereg
    exif
    filter
    ftp
    gd
    gettext
    gmp
    hash
    iconv
    igbinary
    imap
    intl
    json
    libxml
    mbstring
    mcrypt
    memcache
    memcached
    mhash
    mysql
    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
    zip
    zlib

    Please help~~

     
  2. eva2000

    eva2000 Administrator Staff Member

    55,805
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    11:17 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    1. what version of centmin mod and php ?
    2. what version php upgrade from and to ?
    3. what centos version ? 6 or 7 ?
    4. how long ago did you install or update centmin mod ? looks like must be quite old as you're still using APC Cache which is buggy with PHP 5.5+ and higher, i'd switch to Zend Opcache via centmin.sh menu option 12 submenu options after you have updated centmin mod code as outlined below
    5. I'd update centmin mode code first as in past there was as bug with older centmin mod code and missing mcrypt on centos 6. Though it seems you do have mcrypt. Try nginx & php-fpm service restart

    Upgrading Centmin Mod Code to Latest Version



    Upgrading Centmin Mod involves 2 parts.
    1. Upgrading the actual Centmin Mod code outlined at Upgrade Centmin Mod - CentminMod.com LEMP Nginx web stack for CentOS This is heart of Centmin Mod where the code is the engine that runs centmin.sh shell based menu and all the automation you're accustomed to.
    2. Upgrade software that Centmin Mod installed or manages. For this part following outline at Upgrade - How to upgrade Centmin Mod | Centmin Mod Community
    So essentially, you can upgrade from .07 to .08 in place, but not everything is upgraded as some things like server initial environment setup isn't changed i.e. how swap, tmp setup and allocation are created etc. The main parts from part 2 above are what in place upgrades do i.e. Nginx and PHP-FPM compilation and config/settings parameters and MariaDB version from 5.5 to 10.0.x. If you want the full environment changed including tmp and swap setup to .08's configuration, then you would need a fresh OS install and fresh .08 initial install. You can think of it like upgrading Windows 7 to Windows 8. An in place upgrade will upgrade code but won't change your computer environment from when you installed Windows 7 i.e. disk configuration and partition sizes won't change from when you initially installed Windows 7. Only way to change that would be fresh Windows 8 install.

    I'd take care of this first by updating centmin mod code as outlined above and then running centmin.sh menu option 15 to recompile imagick php extension
     
  3. jellday

    jellday Member

    83
    4
    8
    May 31, 2014
    Ratings:
    +11
    Local Time:
    9:17 PM
    1.4.6
    5.5
    Thank you for your reply.
    I've updated the centmin mod code, and upgrade php to 5.4.45. Still same error (To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.)
    Also, I get new error:
    NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/redis.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/redis.so: cannot open shared object file: No such file or directory in Unknown on line 0


     
  4. eva2000

    eva2000 Administrator Staff Member

    55,805
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    11:17 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    still need rest of the answers to the questions on your server environment too

    To troubleshoot, you need to check the the php upgrade 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

    Also post output for the following

    Code (Text):
    php -v
    php --ini
    php -m
    
     
  5. eva2000

    eva2000 Administrator Staff Member

    55,805
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    11:17 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    this could also be a bug in your php app as it could be looking for a linux distro mcrypt package install like yum or apt based but Centmin Mod LEMP's PHP-FPM installs mcrypt via source compile so might be not what your php app is checking for ? so ask your php app's dev/author
     
  6. jellday

    jellday Member

    83
    4
    8
    May 31, 2014
    Ratings:
    +11
    Local Time:
    9:17 PM
    1.4.6
    5.5
    No, I had been using centminmod for years, and the application had been working without any problem. The problem just jumped out of nowhere which I think after I upgrade the PHP version from 5.4.32 to 5.4.45...

    Thanks a lot. I wonder If there is a quick way to identify the problem maybe?
     
  7. eva2000

    eva2000 Administrator Staff Member

    55,805
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    11:17 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    any reason not using newer PHP ? try PHP 5.5.32 or 5.6.18 and with Zend Opcache much faster and more updated as PHP 5.4 EOL
     
  8. jellday

    jellday Member

    83
    4
    8
    May 31, 2014
    Ratings:
    +11
    Local Time:
    9:17 PM
    1.4.6
    5.5
    I doubt if the application runs smoothly with 5.5 or above.
     
  9. eva2000

    eva2000 Administrator Staff Member

    55,805
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    11:17 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    try and see

    also you can run this php script to confirm if mcrypt exists
    PHP:
    <?php
    if (! function_exists ("mcrypt_encrypt")) {
      die (
    "mcrypt php module missing.");
    } else {
      echo 
    "mcrypt php module exists";
    }
    ?>