Page 1 of 1

Install mcrypt extension

Posted: Mon Nov 14, 2011 2:30 am
by webfeatus
Reference: http://forum.parallels.com/showthread.php?t=88711

Is this as simple as...
yum install mcrypt*
(why the asterisk?)

My phpinfo: http://www.webfeatserver.com/status/ind ... on=phpinfo
(I know that's not secure but forgive me)

Will provide any info you need if someone will help me with this.

Re: Install mcrypt extension

Posted: Mon Nov 14, 2011 10:55 am
by scott
You should know better than to look for solutions in the parallels forums by now. :P yum install php-mcrypt is what you want.

Re: Install mcrypt extension

Posted: Tue Nov 15, 2011 8:39 am
by webfeatus
What is the likelihood of running that command and then getting bogged down in issues of associated dependencies required but not installed on my server?

Re: Install mcrypt extension

Posted: Tue Nov 15, 2011 8:47 am
by breun
Yum should resolve those dependencies automatically, if any.

Re: Install mcrypt extension

Posted: Thu Nov 17, 2011 10:16 pm
by webfeatus
scott wrote:yum install php-mcrypt is what you want.
My server admin advised:
yum install asl-php-mcrypt
- any difference?

Re: Install mcrypt extension

Posted: Fri Nov 18, 2011 4:59 am
by breun
Yes, asl-php-mcrypt is the PHP mcrypt package for the webserver that only serves the ASL web interface (the one on port 30000).

Re: Install mcrypt extension

Posted: Fri Nov 18, 2011 5:48 am
by webfeatus
The request is from a client who needs it for a shopping cart (Magento?) under a domain account on the server.
So I should use yum install php-mcrypt - correct?

Re: Install mcrypt extension

Posted: Fri Nov 18, 2011 6:32 am
by breun
Correct.

Re: Install mcrypt extension

Posted: Wed Nov 23, 2011 3:19 am
by webfeatus
I ran yum install php-mcrypt

# rpm -qa | grep mcrypt
libmcrypt-2.5.8-4.el5.centos
php-mcrypt-5.1.6-15.el5.centos.1

BUT:
"You are missing the mcrypt extension" - http://www.atticus.co.id/skel/magento-check.php

NOTES:
# php -r "echo phpinfo();" | grep "^mcrypt"
PHP Warning: PHP Startup: mcrypt: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0

Re: Install mcrypt extension

Posted: Wed Nov 23, 2011 5:12 am
by breun
Looks like your PHP version and PHP mcypt module versions don't match, which might mean there's a problem with your yum repository setup.

What is the output of rpm -q php php-mcrypt?

Re: Install mcrypt extension

Posted: Wed Nov 23, 2011 10:56 am
by webfeatus
same as...
# rpm -q php php-mcrypt
php-5.2.17-1.el5.art
php-mcrypt-5.1.6-15.el5.centos.1
I think I need to upgrade php 5.3 (pain in the arse)
Already installed atomic channel - failed
all that did was remove plesk.repo - nothing else
yum upgrade
aromic upgrade 5.3 php no progress
why do I need 5.3?
atomica repo failed to install

Re: Install mcrypt extension

Posted: Wed Nov 23, 2011 11:37 am
by breun
webfeatus wrote:# rpm -q php php-mcrypt
php-5.2.17-1.el5.art
php-mcrypt-5.1.6-15.el5.centos.1
Well, there's your problem. You're using PHP 5.2.17, but you installed the mcrypt module for PHP 5.1.6, which is not compatible with PHP 5.2.17.

A quick fix to get mcrypt to work would be to download and install the php-mcrypt package for PHP 5.2.17, which luckily is currently still available from the Atomic repository:

http://www2.atomicorp.com/channels/atom ... t.i386.rpm (32 bit)
http://www2.atomicorp.com/channels/atom ... x86_64.rpm (64 bit)

A better fix would be to get your yum repository configuration back into shape and update to maintained software.
webfeatus wrote:I think I need to upgrade php 5.3 (pain in the arse)
Already installed atomic channel - failed
all that did was remove plesk.repo - nothing else
yum upgrade
aromic upgrade 5.3 php no progress
why do I need 5.3?
It's best to use software that is maintained, so that when security issues are found you get updates that fix those issues. You're currently running PHP 5.2.17 which is no longer maintained in the Atomic repository.

You don't necessarily need to upgrade to PHP 5.3: the other option is to downgrade to PHP 5.1.6 which is still maintained by your OS vendor.
webfeatus wrote:atomica repo failed to install
You might want to start a new thread about any installation problems with the Atomic yum repository.

Re: Install mcrypt extension

Posted: Wed Nov 23, 2011 9:17 pm
by webfeatus
I removed the atomic repo some time ago because I'm not experienced enough when it would update php & mysql. I also recall an ioncube issue that drove me crazy. I guess that I will have to look into that again.

I attempted to install the correct mcrypt module for my php version:
rpm -i php-mcrypt-5.2.17-1.el5.art.i386.rpm
file /usr/lib/php/modules/mcrypt.so from install of php-mcrypt-5.2.17-1.el5.art.i386 conflicts with file from package php-mcrypt-5.1.6-15.el5.centos.1.i386

Can you assist me with the steps for success on this point?

Re: Install mcrypt extension

Posted: Thu Nov 24, 2011 3:30 am
by breun
webfeatus wrote:I removed the atomic repo some time ago because I'm not experienced enough when it would update php & mysql. I also recall an ioncube issue that drove me crazy. I guess that I will have to look into that again.
If you removed the atomic repository, then you instead got stuck with an unmaintained version of PHP. It might be better to go downgrade to the PHP 5.1.6 packages in that case, because then you'll still receive security updates.
webfeatus wrote:I attempted to install the correct mcrypt module for my php version:
rpm -i php-mcrypt-5.2.17-1.el5.art.i386.rpm
file /usr/lib/php/modules/mcrypt.so from install of php-mcrypt-5.2.17-1.el5.art.i386 conflicts with file from package php-mcrypt-5.1.6-15.el5.centos.1.i386

Can you assist me with the steps for success on this point?
Use rpm -U php-mcrypt-5.2.17-1.el5.art.i386.rpm (-U: upgrade, -i: install), or go through yum: yum localinstall php-mcrypt-5.2.17-1.el5.art.i386.rpm.

Re: Install mcrypt extension

Posted: Thu Nov 24, 2011 5:08 am
by webfeatus
Thank you for your time and help.

I guess I had better look into why atomic channel failed to install and go from there.