Install mcrypt extension

Support/Development for PHP
User avatar
webfeatus
Forum Regular
Forum Regular
Posts: 196
Joined: Wed Jan 13, 2010 9:11 am
Location: Bali

Install mcrypt extension

Unread post 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.
They say that good intentions, pave the road to hell;
If a thing is not worth doing, it's not worth doing well.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: Install mcrypt extension

Unread post 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.
User avatar
webfeatus
Forum Regular
Forum Regular
Posts: 196
Joined: Wed Jan 13, 2010 9:11 am
Location: Bali

Re: Install mcrypt extension

Unread post 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?
They say that good intentions, pave the road to hell;
If a thing is not worth doing, it's not worth doing well.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: Install mcrypt extension

Unread post by breun »

Yum should resolve those dependencies automatically, if any.
Lemonbit Internet Dedicated Server Management
User avatar
webfeatus
Forum Regular
Forum Regular
Posts: 196
Joined: Wed Jan 13, 2010 9:11 am
Location: Bali

Re: Install mcrypt extension

Unread post by webfeatus »

scott wrote:yum install php-mcrypt is what you want.
My server admin advised:
yum install asl-php-mcrypt
- any difference?
They say that good intentions, pave the road to hell;
If a thing is not worth doing, it's not worth doing well.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: Install mcrypt extension

Unread post 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).
Lemonbit Internet Dedicated Server Management
User avatar
webfeatus
Forum Regular
Forum Regular
Posts: 196
Joined: Wed Jan 13, 2010 9:11 am
Location: Bali

Re: Install mcrypt extension

Unread post 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?
They say that good intentions, pave the road to hell;
If a thing is not worth doing, it's not worth doing well.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: Install mcrypt extension

Unread post by breun »

Correct.
Lemonbit Internet Dedicated Server Management
User avatar
webfeatus
Forum Regular
Forum Regular
Posts: 196
Joined: Wed Jan 13, 2010 9:11 am
Location: Bali

Re: Install mcrypt extension

Unread post 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
They say that good intentions, pave the road to hell;
If a thing is not worth doing, it's not worth doing well.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: Install mcrypt extension

Unread post 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?
Lemonbit Internet Dedicated Server Management
User avatar
webfeatus
Forum Regular
Forum Regular
Posts: 196
Joined: Wed Jan 13, 2010 9:11 am
Location: Bali

Re: Install mcrypt extension

Unread post 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
They say that good intentions, pave the road to hell;
If a thing is not worth doing, it's not worth doing well.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: Install mcrypt extension

Unread post 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.
Lemonbit Internet Dedicated Server Management
User avatar
webfeatus
Forum Regular
Forum Regular
Posts: 196
Joined: Wed Jan 13, 2010 9:11 am
Location: Bali

Re: Install mcrypt extension

Unread post 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?
They say that good intentions, pave the road to hell;
If a thing is not worth doing, it's not worth doing well.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: Install mcrypt extension

Unread post 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.
Lemonbit Internet Dedicated Server Management
User avatar
webfeatus
Forum Regular
Forum Regular
Posts: 196
Joined: Wed Jan 13, 2010 9:11 am
Location: Bali

Re: Install mcrypt extension

Unread post 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.
They say that good intentions, pave the road to hell;
If a thing is not worth doing, it's not worth doing well.
Post Reply