How to Install mcrypt PHP extension on CentOS Virtualmin

The default installation of virutalmin doesn’t come with additional PHP extensions which some php scripts may need, you have to manually install each php extension compare with easyapache from cPanel which you can install all at once.

Add centOS repo

For CentOS 5

rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

For CentOS 6

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm
yum install php-mcrypt

Check php.ini location ( /etc/php.ini is the default virtualmin php.ini location )

php -i | grep php.ini
nano /etc/php.ini

add extension to php.ini

extension =mcrypt.so

Retart Apache Server

/etc/init.d/httpd restart

After adding centOS Repositories, you could install php extension from virtualmin GUI

Webmin > System Software Packages > Choose Package from YUM > Click Browse YUM, type the php extension name in the search box and click find packing matching button, and then click the package name install.

Add php extension to php.ini from virtualmin GUI

Webmin > Others > PHP Configuration > Edit Manually

Don’t forget to restart apache server.

Most popular PHP extension you may need:
Format: extension = [extension name].so

•bcmath
•curl
•dba
•dom
•fileinfo
•gd
•imap
•imagick
•json
•ldap
•mailparse
•mbstring
•mcrypt
•mysql
•mysqli
•ncurses
•odbc
•pdo
•pdo_mysql (requires pdo)
•pdo_odbc (requires pdo)
•pdo_pgsql (requires pdo)
•pdo_sqlite (requires pdo)
•pgsql
•rrdtool
•snmp
•soap
•tidy
•xmlreader
•xmlrpc
•xmlwriter
•xsl
•zip

3 thoughts on “How to Install mcrypt PHP extension on CentOS Virtualmin

Leave a Reply

Your email address will not be published. Required fields are marked *