Version 4 (modified by dmorton, 16 years ago) (diff)


Building PHP with mcrypt support, to allow encryption in Maia Mailguard

from Paul Westbrook

In order to support the encryption feature of Maia Mailguard, PHP needs to be built with support for mcrypt. Most distributions do not include this support in PHP by default, so the PHP packages need to be rebuilt to include it. The following steps can be used to build a php rpm that includes this support. These steps can be modified for any distribution that uses rpms for installation.

  1. Download the source rpm from Red Hat (for your distribution)
  2. rpm -Uvh php-*.src.rpm
  3. cd /usr/src/redhat/SPECS/
  4. edit php.spec to include "--with-mcrypt "
  5. rpmbuild -ba php.spec
  6. cd /usr/src/redhat/RPMS/i386
  7. rpm -Uvh php*.rpm
  8. restart apache

Debian & PHP with MCRYPT

A much easier process :)

  1. apt-get install php4-mcrypt
  2. egrep -R /etc/php4/ mcrypt\.so *
  3. If there were no results from the egrep command, add "" to php.ini (usually the apt-get step takes care of editing php.ini for you automatically)
  4. Restart Apache

SUSE >= 9.1

  • It's available in default install. Use yast to install the php4-mcrypt module.

Back to FAQ

Attachments (1)

Download all attachments as: .zip