Solved

mcrypt

Posted on 2011-09-14
11
603 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
  • 7
  • 4
11 Comments
 
LVL 29

Expert Comment

by:Randy Downs
ID: 36536566
0
 
LVL 29

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
 
LVL 29

Expert Comment

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

0
 
LVL 29

Expert Comment

by:Randy Downs
ID: 36536718
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 1

Author Comment

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

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 29

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 29

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
LDAP find expired users 8 70
Install Dell OpenManage on Ubuntu PowerEdge R410 3 41
Scripted configuration of TightVNC with Start on boot 7 51
linux redhat 7.2 10 30
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

914 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now