1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Adding mcrypt extension to php on plesk 11

Discussion in 'Plesk 11.x for Linux' started by SébastienD, Feb 11, 2013.

  1. SébastienD

    SébastienD New Pleskian

    10
     
    Joined:
    Feb 11, 2013
    Messages:
    2
    Likes Received:
    0
    HEllo,

    I would like to install mcrypt extension on my server and i don't find procedure . If someone could help me

    My version is :
    OS CentOS 6.3 (Final)
    Version de Parallels Panel 11.0.9 Mettre à jour #36, dernière mise à jour à Fév 8, 2013 06:32 PM

    thx,
    Seabstien
     
  2. eilko

    eilko Regular Pleskian

    28
    73%
    Joined:
    Aug 1, 2001
    Messages:
    468
    Likes Received:
    4
    Location:
    Enschede, Netherlands
  3. SébastienD

    SébastienD New Pleskian

    10
     
    Joined:
    Feb 11, 2013
    Messages:
    2
    Likes Received:
    0
    Hello Eilko,

    If i follow this procedure, mcrypt will be installed without disturb plesk ?

    Thx,

    Sebastien
     
  4. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,546
    Likes Received:
    1,240
    Location:
    Novosibirsk, Russia
  5. Dx3webs

    Dx3webs Basic Pleskian

    20
    23%
    Joined:
    Oct 11, 2010
    Messages:
    78
    Likes Received:
    1
    There
    I thought plesk warned against 3rd party repos.. atomic is mentioned in particular
     
  6. GravuTrad

    GravuTrad Regular Pleskian

    28
    23%
    Joined:
    Apr 28, 2006
    Messages:
    269
    Likes Received:
    0
    No. You can use it.

    The answer given by igor is the soluce.
     
  7. Eric Pretorious

    Eric Pretorious Regular Pleskian

    15
    35%
    Joined:
    Mar 2, 2013
    Messages:
    188
    Likes Received:
    0
    Location:
    Truckee, CA
    Hey, Dx3webs:

    How's about providing a link to the page where you found that warning?

    TIA,
     
  8. Dx3webs

    Dx3webs Basic Pleskian

    20
    23%
    Joined:
    Oct 11, 2010
    Messages:
    78
    Likes Received:
    1
  9. Eric Pretorious

    Eric Pretorious Regular Pleskian

    15
    35%
    Joined:
    Mar 2, 2013
    Messages:
    188
    Likes Received:
    0
    Location:
    Truckee, CA
    Thanks, eilko! That answered the question perfectly!

    FTR: The php-mcrypt package is available (for Centos, Scientific Linux, and Oracle Linux administrators) from the RPMforge repository (a.k.a. Dag's repository) and from the EPEL repository. To add the RPMforge repo to your Centos, Scientific Linux, or Oracle Linux system...

    Code:
    [root@www ~]# rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
    
    [root@www ~]# rpm -Uvh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
    Preparing...                ########################################### [100%]
       1:rpmforge-release       ########################################### [100%]
    
    [root@www ~]# yum repolist
    Loaded plugins: downloadonly, fastestmirror, priorities, security
    Determining fastest mirrors
     * base: centos.mirror.netriplex.com
     * extras: mirror.nexcess.net
     * rpmforge: mirror.teklinks.com
     * updates: ftp.linux.ncsu.edu
    repo id                                                                     repo name                                                                                      status
    base                                                                        CentOS-6 - Base                                                                                6,381
    extras                                                                      CentOS-6 - Extras                                                                                 12
    rpmforge                                                                    RHEL 6 - RPMforge.net - dag                                                                    4,594
    updates                                                                     CentOS-6 - Updates                                                                               458
    repolist: 11,445
    
    [root@www ~]# yum search php-mcrypt
    Loaded plugins: downloadonly, fastestmirror, priorities, security
    Loading mirror speeds from cached hostfile
     * base: centos.mirror.netriplex.com
     * extras: mirror.nexcess.net
     * rpmforge: mirror.teklinks.com
     * updates: ftp.linux.ncsu.edu
    ======================= N/S Matched: php-mcrypt =======================
    php-mcrypt.x86_64 : Standard PHP module provides mcrypt library support
    Installing the php-mcrypt package does not quite fix the problem, however, because even though the package contains the module Apache does not load the module:

    Code:
    [root@www ~]# rpm -ql php-mcrypt
    [COLOR="#00FF00"]/etc/php.d/mcrypt.ini
    /usr/lib64/php/modules/mcrypt.so[/COLOR]
    
    [root@www ~]# cat /etc/php.d/mcrypt.ini 
    ; Enable mcrypt extension module
    [COLOR="#FF0000"]extension=module.so[/COLOR]
    
    [root@www ~]# ls -1 --classify /usr/lib64/php/modules/
    curl.so*
    dom.so*
    fileinfo.so*
    gd.so*
    imap.so*
    ioncube_loader_lin_5.1.so
    ioncube_loader_lin_5.2.so
    ioncube_loader_lin_5.3.so
    json.so*
    mbstring.so*
    [COLOR="#00FF00"]mcrypt.so*[/COLOR]
    mysqli.so*
    mysql.so*
    pdo_mysql.so*
    pdo.so*
    pdo_sqlite.so*
    phar.so*
    sqlite3.so*
    sw-engine/
    wddx.so*
    xmlreader.so*
    xmlwriter.so*
    xsl.so*
    zip.so*
    
    [root@www ~]# apachectl -t -D DUMP_MODULES | grep php
     php5_module (shared)
    Syntax OK
    
    [root@www ~]# apachectl -t -D DUMP_MODULES | grep crypt
    Syntax OK
    In order to force Apache to load the mcrypt.so module, I had to modify the mcrypt.ini file, restart Apache, and check the output of the phpinfo() subroutine:

    Code:
    [root@www ~]# cat /etc/php.d/mcrypt.ini 
    ; Enable mcrypt extension module
    [COLOR="#FF0000"]extension=module.so[/COLOR]
    
    [root@www ~]# wget -qO- http://rocket-powered.com/info.php | grep -i mcrypt
    /etc/php.d/mcrypt.ini,
    
    [root@www ~]# vi /etc/php.d/mcrypt.ini
    
    [root@www ~]# /etc/init.d/httpd restart
    Stopping httpd:                                            [  [COLOR="#00FF00"]OK[/COLOR]  ]
    Starting httpd:                                            [  [COLOR="#00FF00"]OK[/COLOR]  ]
    
    [root@www ~]# cat /etc/php.d/mcrypt.ini 
    ; Enable mcrypt extension module
    [COLOR="#00FF00"]extension=mcrypt.so[/COLOR]
    
    [root@www ~]# apachectl -t -D DUMP_MODULES | grep crypt
    Syntax OK
    
    [root@www ~]# wget -qO- http://rocket-powered.com/info.php | grep -i mcrypt | html2text 
    /etc/php.d/mcrypt.ini,
    Registered Stream Filters
    zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower,
    string.strip_tags, convert.*, consumed, dechunk, mcrypt.*, mdecrypt.*
    ***** mcrypt *****
    mcrypt support
    enabled
    mcrypt_filter support
    enabled
    mcrypt.algorithms_dir
    no value
    no value
    mcrypt.modes_dir
    no value
    no value
    For more information about additional CentOS repositories and YUM:


    HTH,
     
    Last edited: Apr 6, 2013
  10. Eric Pretorious

    Eric Pretorious Regular Pleskian

    15
    35%
    Joined:
    Mar 2, 2013
    Messages:
    188
    Likes Received:
    0
    Location:
    Truckee, CA
  11. romand700

    romand700 Regular Pleskian

    26
    90%
    Joined:
    Mar 24, 2008
    Messages:
    112
    Likes Received:
    0
    Location:
    Italy
    Hi.. I resume this old post. Everything ok, no probem in this procedure. But now I have in my plesk 11.5 the version PHP 5.4.23 and no the version PHP 5.3.3 that plesk installed by default. PHP version 5.3.3 is overwritten?

    Is this normal?

    Thanks and happy new year 2014

    __________________
    Andrea
     
  12. eugenevdm

    eugenevdm Silver Pleskian

    30
    68%
    Joined:
    Nov 11, 2003
    Messages:
    611
    Likes Received:
    0
    Some facts about this post:

    Edit: The solution is at the end, a Stack Exchange post.

    1. This is a fairly old post. I find it ironic that mcrypt is not enabled by default on my PPA system because, after all, my customers simply followed the APS Applications installer to get Magento working. It fails with "The 'mcrypt' extension was not found.".

    2. If you were wondering about the screencast of @Dx3webs, yes indeed the actual message is when moving over to @IgorG might get you in serious trouble down the road. The actual message of the screencast is:

    PS. The actual message include the typo "upgdare".

    3. From what I recall years ago Atomic is a reliable source - he apparently used to work for SWSoft back in the days. So I decided to give @IgorG's method a go:

    (I've left out some of the major text to include only relevant parts)


    As you can see, if you install Atomic repos you may be irrecoverably changing your server to a new PHP version from a 3rd party source. You are installing unsupported software. My guess is, if you log a ticket because things start going horribly wrong, you will be told "3rd party repo - sorry".

    4. My advice find some other way to get it working with your existing install.

    EDIT:

    This worked:
    http://stackoverflow.com/questions/17109818/install-php-mcrypt-on-centos6
     
    Last edited: Mar 9, 2014
  13. Dx3webs

    Dx3webs Basic Pleskian

    20
    23%
    Joined:
    Oct 11, 2010
    Messages:
    78
    Likes Received:
    1
    The warning does sound dire... Having said that you can safely build your servers on the atomic repo without any issues.
     
  14. qpidity

    qpidity New Pleskian

    8
    20%
    Joined:
    Jun 13, 2013
    Messages:
    20
    Likes Received:
    0
    Hi,

    I tried this on parallels 11.0.9 CentOS 6.3 but when I check if the module is active (php -m on command line) it does not output as installed/active.

    Please advise.

    Thanks in advance
     
  15. Dx3webs

    Dx3webs Basic Pleskian

    20
    23%
    Joined:
    Oct 11, 2010
    Messages:
    78
    Likes Received:
    1
    have you restarted httpd?
     
  16. qpidity

    qpidity New Pleskian

    8
    20%
    Joined:
    Jun 13, 2013
    Messages:
    20
    Likes Received:
    0
    I ran the following:
    # /etc/init.d/psa stop
    # /etc/init.d/psa start
     
  17. Dx3webs

    Dx3webs Basic Pleskian

    20
    23%
    Joined:
    Oct 11, 2010
    Messages:
    78
    Likes Received:
    1
    You will need to do


    then check

    php -m
     
  18. qpidity

    qpidity New Pleskian

    8
    20%
    Joined:
    Jun 13, 2013
    Messages:
    20
    Likes Received:
    0
    great, tried that and now I see it mcrypt output when I run php -m

    thanks a lot Dx3webs!
     
  19. qpidity

    qpidity New Pleskian

    8
    20%
    Joined:
    Jun 13, 2013
    Messages:
    20
    Likes Received:
    0
    Hi again,

    After installing that mcrypt module some time back (see above) we've noticed that the plesk control panel (parallels 11.0.9 CentOS 6.3) won't auto update, throwing the following error:

    The hosting company advised:
    I really need some advice as to how to proceed. I want the plesk control panel to auto update correctly but at present this means (according to the above) disabling Atomic. We need mcrypt for our site to function correctly so I'm hesitant to do that. My knowledge in this area is lacking so I'd appreciate any advice that any one may be able to offer.

    Many thanks in advance
     
  20. Dx3webs

    Dx3webs Basic Pleskian

    20
    23%
    Joined:
    Oct 11, 2010
    Messages:
    78
    Likes Received:
    1
    Dont panic.

    This can happen if for some reason atomic cant update. This means when plesk tries to upgrade components Yum fails on atomic installed components.

    you can find out what the issue is by running

    yum upgrade php

    from the command line. I suspect the warning you get will be for outdated keys.

    There are a couple of this you may need to try to fix this.

    either run:

    wget -q -O - http://www.atomicorp.com/installers/atomic | sh

    again which may do the trick or

    yum update atomic-release

    or

    yum clean all


    in that order. Then test with

    yum upgrade php

    or similar. This should run smoothly now allowing you to upgrade plesk

    Despite the warnings atomic is still a great way to keep your servers up to date.
     
Loading...