Skip to main content
Welcome guest. | Register | Login | Post

Compiling PHP with mcrypt on a MediaTemple (dv) Dedicated-Virtual 3.0 server

6 replies [Last post]
Offline
Joined: 2007-09-17

Hello! I am in dire need of some help with activating the php-mcrypt library on my mediatemple DV 3.0 server. I am basically a Linux n00b though I'm learning, but I can't seem to find a solution for this problem. On my DV I'm running CentOS 4 and php5.1.4 in CGI mode per the MT knowledge base article: http://kb.mediatemple.net/article.php?id=260 . This is all working fine. My problem now is that I need to install a script written by someone else that utilizes the mcrypt library. I have been scouring the web for the last week or so for information on how to do this but I cannot find a solid solution.

The first thing I tried was yum. I installed it and activated all repos I could find. I tried running yum install mcrypt and yum install php-mcrypt, neither works. Each time yum starts the update process then says something like "No match for arguments mcrypt, nothing to do" and dies. I'm assuming this just means there are no mcrypt files in the repo but if this is the case how can I find a repo that has what I need?

Another option I found would be to install an RPM of mcrypt. So far I have not been able to find one that will work. Research indicates that building out an RPM for php-mcrypt would require the libmcrypt and libmcrypt-devel libraries installed, which I have already done. It seems like if I could find an mcrypt rpm that is compatible with my distro and verions that that would work, but I can't figure out where to get a working rpm and if I did I'm not too sure how to go about compiling it. Working from explanations found here: http://www.experts-exchange.com/Software/Internet_Email/File_Sharing/SSH_Telnet/Q_22753999.html

A third solution seems to be recompiling PHP on the server and including php-mcrypt in the configure command. However to do this I believe I still need to have source code for mcrypt installed somewhere then point the configure command towards that place when rebuilding PHP. I just do not know enough about Linux to get this done and I don't know what ramifications there could be for doing this. I don't want to bring down my entire server if I screw something up, and I don't want to compile PHP incorrectly and leave any security holes open.

It seems to me that activating mcrypt should be a simple process. Maybe I'm just overlooking the easy solution but right now a fix to this problem eludes me. Can anyone out there help me? I could really use a hand right about now.

thanks everyone
-Aaron

a thing's picture
Offline
Joined: 2005-12-20
distro

What distro do you have running on the server? Also see if you already have php-mcrypt installed (rpm -q php-mcrypt). If you are running Fedora, it should be a simple matter of running "yum install php-mcrypt" if it isn't installed.

Offline
Joined: 2007-09-17
Its CentOS 4 which is

Its CentOS 4 which is apparently a repackaged version of FC4/Redhat enterprise. yeah I've tried pretty much every variation of yum install mcrypt, yum install php-mcrypt, etc. I've enabled extra repos and searched again. Nothing works. yum can't find any packages that are compatible.

a thing's picture
Offline
Joined: 2005-12-20
centosplus

In CentOS 4, it appears that php-mcrypt is in the centosplus repo. The instructions for enabling this repo are here. It looks like it would be a good idea to add includepkgs=libmcrypt php-mcrypt to the /etc/yum.repos.d/CentOS-Base.repo section for CentOSPlus (if it says there are missing dependencies then add those to the includepkgs line).

You should disable any other repos that you've added to make sure you don't accidentally mess up your base system (install unsupported updates to official CentOS packages).

a thing's picture
Offline
Joined: 2005-12-20
update?

Have you solved the problem?

Offline
Joined: 2007-09-17
yes and no. After extensive

yes and no. After extensive research and a department-wide teleconference with MT's head technicians the determination was made that the DV will not support a compile with mcrypt, or any other custom PHP compilation for that matter. The problem seems to stem from the server setup which is quite convoluted due to using the Plesk control panel and a bunch of custom scripts to make it work. The consensus from MT was basically two options: 1. ditch Plesk and run a vanilla Redhat distro (no CentOS) and compile all our own stuff and manage the server old-school style, or 2. stick with Plesk for administration and live without mcrypt.

In the end we solved the problem by rewriting our client app without mcrypt. Not the most elegant solution but it works.

a thing's picture
Offline
Joined: 2005-12-20
another control pannel

If you still want a control panel, try Webmin and ISPConfig. I doubt either of those would screw up your system like the proprietary Plesk did and you may be able to use the old version of the client with mcrypt.