Solved

mcrypt

Posted on 2011-09-14
11
623 Views
Last Modified: 2012-05-12
Hi i try to install mcrypt on centos. I intall it using yum and it said it installed. I try to restart apache and nothing happens. It just do not work in php. How i can fix it.
0
Comment
Question by:umaxim
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
11 Comments
 
LVL 30

Expert Comment

by:Randy Downs
ID: 36536566
0
 
LVL 30

Expert Comment

by:Randy Downs
ID: 36536577
Update PHP packages
Before updating your PHP packages you'll want to get a list of what you currently have installed. To get a list of current PHP packages run the following:

 # rpm -qa |grep php
Now you can use yum to update the PHP packages on your system:

 # yum update
You should be shown a list of packages that are going to be updated. Compare it to the list of PHP packages on your system. Note any packages that are not in the list. You'll need to remove these packages or find updates for them because they won't work after you update to PHP 5.2.x. If that is acceptable type "y" to continue and let yum update the packages.
Once yum has completed restart Apache:

 # service httpd restart
To verify the update is working create a simple testing.php in your www directory with the following source code:

<?php
  phpinfo();
?>
and open it in a web browser. The new PHP version should be reflected at the top of the page.
0
 
LVL 1

Author Comment

by:umaxim
ID: 36536605
still do not see anything in my phpinfo()
http://cl.iwebpixels.com/test.php
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 30

Expert Comment

by:Randy Downs
ID: 36536703
extension commented out in php.ini?

0
 
LVL 30

Expert Comment

by:Randy Downs
ID: 36536718
0
 
LVL 1

Author Comment

by:umaxim
ID: 36536783
i did not found it in php.ini
0
 
LVL 30

Expert Comment

by:Randy Downs
ID: 36536829
OK looks like it's not used

http://www.centos.org/modules/newbb/viewtopic.php?topic_id=13618

The php-mcrypt configuration file is /etc/php.d/mcrypt.ini, it's loaded automatically. No changes to /etc/php.ini are needed.
0
 
LVL 1

Author Comment

by:umaxim
ID: 36536845
yes this is my case
0
 
LVL 30

Expert Comment

by:Randy Downs
ID: 36536888
Did you try this? Note that the versions of php are probably different.

Updating/Installing mcrypt
If you have php-mcrypt for PHP 5.1.x installed you'll want to remove it:
Note: Your version number maybe different. Alter below command accordingly.

 rpm -e php-mcrypt-5.1.6-15.el5.centos.1
Download php-mcrypt for PHP 5.2.x and install it. You can find a 32-bit php-mcrypt package here FedoraJunkies.
Note: You'll notice the "--nodeps" flag in the example. When you try to install php-mcrypt without it you get an error that php-common-5.2.6-2.el5s2 is missing even though it is installed.

 wget -c http://sourcemirrors.org/scotth/centos/5/php/php-mcrypt-5.2.6-2.i386.rpm
 rpm -i --nodeps php-mcrypt-5.2.6-2.i386.rpm
Restart Apache and you should now see mcrypt information on your testing.php page.
0
 
LVL 1

Author Comment

by:umaxim
ID: 36537053
it said connection refusend when i try to download file
0
 
LVL 30

Accepted Solution

by:
Randy Downs earned 500 total points
ID: 36537314
That site no longer works. If you have 64 bit machine these should be OK

http://www.atoomnet.net/centos_updated_php.php

wget 'http://www.atoomnet.net/./php/php-5.2.17/php-mcrypt-5.2.17-1.x86_64.rpm'
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question