trying to install mcrypt on CentOS 5

I am getting the attached error message in a php file.

I figured I needed to install mcrypt.

I am using CentOS 5

How do I do this?
PHP Version: 5.1.6;  Zend Engine Version: 2.1.0;  Qcodo Version: 0.3.43 (Qcodo Beta 3)
Application: Apache/2.2.3 (CentOS);  Server Name: 74.208.112.70
HTTP User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 (.NET CLR 3.5.30729)
Use of undefined constant MCRYPT_TRIPLEDES - assumed 'MCRYPT_TRIPLEDES'
Error Type:   E_NOTICE
 
Rendered Page:   Click here to view contents able to be rendered
 
Source File:   /var/www/vhosts/latenightstudies.com/httpdocs/trunk/includes/qcodo/_core/qform_state_handlers/QFormStateHandler.class.php     Line:   21
 
Line 16:    				// Cleanup FormState Base64 Encoding
Line 17:    				$strFormState = str_replace('+', '-', $strFormState);
Line 18:    				$strFormState = str_replace('/', '_', $strFormState);
Line 19:    			} else {
Line 20:    				// Use QCryptography to Encrypt
Line 21:    				$objCrypto = new QCryptography(QForm::$EncryptionKey, true);
Line 22:    				$strFormState = $objCrypto->Encrypt($strFormState);
Line 23:    			}
Line 24:    			return $strFormState;
Line 25:    		}
Line 26:

Open in new window

SWB-ConsultingAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

fosiul01Commented:
trry yum install mcrypt
0
ravenplCommented:
In Your case rather:
yum install php-mcrypt
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
fosiul01Commented:
try with this one f irst

yum install mcrypt  , it should install all the dependencies

or
yum install mcrypt*
yum install mhash*
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

SWB-ConsultingAuthor Commented:
this is what i get:

[root@server ~]# yum install mcrypt
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
 * base: update.onlinehome-server.com
 * updates: update.onlinehome-server.com
 * addons: update.onlinehome-server.com
 * extras: update.onlinehome-server.com
base                      100% |=========================| 1.1 kB    00:00
updates                   100% |=========================|  951 B    00:00
addons                    100% |=========================|  951 B    00:00
extras                    100% |=========================| 1.1 kB    00:00
Setting up Install Process
Parsing package install arguments
No package mcrypt available.
Nothing to do
[root@server ~]#
0
fosiul01Commented:
what about as ravenpl said yum install php-mcrypt ??
0
SWB-ConsultingAuthor Commented:
this one worked:

[root@server ~]# yum install php-mcrypt
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
 * base: update.onlinehome-server.com
 * updates: update.onlinehome-server.com
 * addons: update.onlinehome-server.com
 * extras: update.onlinehome-server.com
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package php-mcrypt.x86_64 0:5.1.6-15.el5.centos.1 set to be updated
--> Processing Dependency: libmcrypt.so.4()(64bit) for package: php-mcrypt
--> Running transaction check
---> Package libmcrypt.x86_64 0:2.5.8-4.el5.centos set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 php-mcrypt              x86_64     5.1.6-15.el5.centos.1  extras             16
 k
Installing for dependencies:
 libmcrypt               x86_64     2.5.8-4.el5.centos  extras            105 k

Transaction Summary
=============================================================================
Install      2 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 121 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): php-mcrypt-5.1.6-1 100% |=========================|  16 kB    00:00
(2/2): libmcrypt-2.5.8-4. 100% |=========================| 105 kB    00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: libmcrypt                    ######################### [1/2]
  Installing: php-mcrypt                   ######################### [2/2]

Installed: php-mcrypt.x86_64 0:5.1.6-15.el5.centos.1
Dependency Installed: libmcrypt.x86_64 0:2.5.8-4.el5.centos
Complete!
0
fosiul01Commented:
or try to add this repo

 wget -c  http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
then install rpm -Uvh rpmfor......

and wget -c http://download.fedora.redhat.com/pub/epel/4/i386/epel-release-4-9.noarch.rpm
rpm -Uvh epel...

then try with yum again
0
SWB-ConsultingAuthor Commented:
but i am still getting the same error message, is there anything else I need to do now to activate mcrypt?
0
fosiul01Commented:
ok then ravenpl's solution should be accepted
0
ravenplCommented:
the php-mcrypt is standard, yet if You want mcrypt as well (You don't need it for php) then please install EPEL repository first

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
(replace those i386 with x86_64 if You on 64bit OS)
0
ravenplCommented:
You need to restart the apache php-mcrypt installed.
0
SWB-ConsultingAuthor Commented:
no, if php-mcrypt is all i need then i don't want to install anything else in addition.

i am still getting the error message from my first post, what do i need to do in order to get mcrypt activated?
0
SWB-ConsultingAuthor Commented:
By "You need to restart the apache php-mcrypt installed." do you mean I need to restart apache? I am not sure what you meant by "php-mcrypt installed"
0
fosiul01Commented:
yes you need to restart the apache to get effect of this installation

you can do this by  service httpd restart
0
Adam_Crawf0rdCommented:
I tried this and got

Error: Missing Dependency: libmcrypt.so.4 is needed by package php-mcrypt
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.