CentOS and PHP 5.2

I ran through a tutorial for updating to PHP 5.2 via RPMs';

http://wiki.centos.org/HowTos/PHP5.1To_5.2

In the tutorial I did;

wget http://yum.cocoiti.com/CentOS/5/RPMS/i686/php-mcrypt-5.2.10-1.i686.rpm

rpm -i --nodeps php-mcrypt-5.2.10-1.i686.rpm
warning: php-mcrypt-5.2.10-1.i686.rpm: Header V3 DSA signature: NOKEY, key ID 9f63b763

Restarted apache, mcrypt wasn't installed. (I used a phpinfo() page.)

However.. it installed mcrypt.so to;

/usr/lib/php/modules/

But all the other .so files are stored in;

/usr/lib64/php/modules/

I copied the file to the lib64 directory, and restarted apache. Still didn't work.

So.. then.. I tried to unstall, by doing this;

rpm -qa |grep php-m

Returned;````
php-mysql-5.2.10-1.el5.centos
php-mcrypt-5.2.10-1
php-mbstring-5.2.10-1.el5.centos

Then I typed in;````
rpm -e php-mycrypt-5.2.10-1
error: package php-mycrypt-5.2.10-1 is not installed

Yeah.. so now I'm stuck, don't know how to make php use it.. I also found a file;

/etc/php.d/mcrypt.ini

Contents:

; Enable mcrypt extension module

extension=mcrypt.so

Am I totally screwed or what? :P

4 Replies

Sounds like you downloaded the 32bit mcrypt module on a 64 bit php installation, find the 64 bit module and install that.

@obs:

Sounds like you downloaded the 32bit mcrypt module on a 64 bit php installation, find the 64 bit module and install that. Ok, I thought i686 was 64 bit, but on more inspection I see that I agree with you that I need x86_64.

That doesn't resolve the issue with how to remove the invalid i686 rpm.

oops sorry

rpm -e php-mycrypt-5.2.10-1

error: package php-mycrypt-5.2.10-1 is not installed

You typoed, you put mycrypt.

Very bizzare, today I tried to install php-mycrypt, and I got this error;

Transaction Check Error:
  package php-mcrypt-5.2.10-1.i686 (which is newer than php-mcrypt-5.2.9-2.el5.centos.3.x86_64) is already installed

So then! I did; rpm -e php-mcrypt-5.2.10-1.i686
And it worked! lol

So I guess, if you are running CentOS 64 bit, the correct lettering includes the type of rpm, in this case i686, in order to uninstall. I hope this helps someone out there with similar issues with installing the wrong type of rpm on their linux box.. :P

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct