• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4296
  • Last Modified:

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

0
SWB-Consulting
Asked:
SWB-Consulting
  • 6
  • 5
  • 3
  • +1
1 Solution
 
fosiul01Commented:
trry yum install mcrypt
0
 
ravenplCommented:
In Your case rather:
yum install php-mcrypt
0
 
fosiul01Commented:
try with this one f irst

yum install mcrypt  , it should install all the dependencies

or
yum install mcrypt*
yum install mhash*
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 5
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now