CentOS Linux 6.7
Webmin version 1.760
Virtualmin version 4.18.gpl
I have an issue with PHP after installing php-mcrypt. To install php-mcrypt I followed the instructions here:
http://stackoverflow.com/questions/17109818/install-php-mcrypt-on-centos-6
Specifically:
“I had the same issue, and found the previous suggestions gave me enough info to get it working on my server. The following is what I did:
- Install EPEL repository (From: http://www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x):
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
- Install it via:
yum update
yum install php-mcrypt*
The yum update updated the repository reference on my server then the 2nd command got what I needed 
- Restart your webserver. For my apache install I did:
service httpd restart”
php-mcrypt is now installed and working with php 5.3 however now the server won’t run multiple php versions.
When I try and use PHP 5.4 php doesn’t execute when I try and browse a site it downloads a file rather than rendering the page in the browser.
Can anyone help me with this issue?
A little more detail on this; the issue I have now is I cannot run sites in either CGI or FCGI mode now I can only run as mod_php and when in mod_php mode the php for the site is controlled via /etc/php.ini not /home/site/…/php.ini
Something to do with the install of php-mcrypt now means CGI & FCGI modes no longer work. Can anyone help/advise me on how to fix this issue???
rpm -qa | grep php
php-mysql-5.3.3-46.el6_6.x86_64
php-mbstring-5.3.3-46.el6_6.x86_64
php54-runtime-1.1-5.el6.centos.alt.x86_64
php54-php-pdo-5.4.16-22.el6.centos.alt.x86_64
php54-php-gd-5.4.16-22.el6.centos.alt.x86_64
php54-php-pecl-apc-3.1.15-0.4.20130912.el6.centos.alt.x86_64
php54-php-pspell-5.4.16-22.el6.centos.alt.x86_64
php54-apc-panel-3.1.15-0.4.20130912.el6.centos.alt.noarch
php54-php-pgsql-5.4.16-22.el6.centos.alt.x86_64
php54-php-pecl-zendopcache-7.0.2-4.el6.centos.alt.x86_64
php54-php-odbc-5.4.16-22.el6.centos.alt.x86_64
php-cli-5.3.3-46.el6_6.x86_64
php-odbc-5.3.3-46.el6_6.x86_64
php-imap-5.3.3-46.el6_6.x86_64
php-pear-1.9.4-4.el6.noarch
php-snmp-5.3.3-46.el6_6.x86_64
php54-php-xml-5.4.16-22.el6.centos.alt.x86_64
php54-php-5.4.16-22.el6.centos.alt.x86_64
php54-php-tidy-5.4.16-22.el6.centos.alt.x86_64
php54-php-intl-5.4.16-22.el6.centos.alt.x86_64
php54-php-soap-5.4.16-22.el6.centos.alt.x86_64
php54-php-fpm-5.4.16-22.el6.centos.alt.x86_64
php54-php-dba-5.4.16-22.el6.centos.alt.x86_64
php54-php-pecl-memcache-3.0.8-3.el6.centos.alt.x86_64
php-5.3.3-46.el6_6.x86_64
php-xmlrpc-5.3.3-46.el6_6.x86_64
wbm-php-pear-1.5-1.noarch
php54-php-cli-5.4.16-22.el6.centos.alt.x86_64
php54-php-pear-1.9.4-10.el6.centos.alt.noarch
php54-php-mysqlnd-5.4.16-22.el6.centos.alt.x86_64
php54-php-devel-5.4.16-22.el6.centos.alt.x86_64
php54-php-enchant-5.4.16-22.el6.centos.alt.x86_64
php54-build-1.1-5.el6.centos.alt.x86_64
php54-php-imap-5.4.16-22.el6.centos.alt.x86_64
php54-scldevel-1.1-5.el6.centos.alt.x86_64
php54-php-snmp-5.4.16-22.el6.centos.alt.x86_64
php54-php-xmlrpc-5.4.16-22.el6.centos.alt.x86_64
php-gd-5.3.3-46.el6_6.x86_64
php-pgsql-5.3.3-46.el6_6.x86_64
php54-php-common-5.4.16-22.el6.centos.alt.x86_64
php54-php-process-5.4.16-22.el6.centos.alt.x86_64
php54-1.1-5.el6.centos.alt.x86_64
php54-php-recode-5.4.16-22.el6.centos.alt.x86_64
php54-php-pecl-apc-devel-3.1.15-0.4.20130912.el6.centos.alt.x86_64
php54-php-ldap-5.4.16-22.el6.centos.alt.x86_64
php54-php-mbstring-5.4.16-22.el6.centos.alt.x86_64
php54-php-bcmath-5.4.16-22.el6.centos.alt.x86_64
php-mcrypt-5.3.3-3.el6.x86_64
php-common-5.3.3-46.el6_6.x86_64
php-pdo-5.3.3-46.el6_6.x86_64
php-xml-5.3.3-46.el6_6.x86_64
Can anyone help me with this issue?
OK for anyone who has this same issue I’ve resolved it, it turns out it relates to:
https://www.virtualmin.com/documentation/system/faq#Why_does_PHP_ProFTPd_no_longer_work_after_performing_updates_I-m_using_CentOS_and_enabled_third_party_repositories
I found this
<FilesMatch .php$>
SetHandler application/x-httpd-php
in /etc/httpd/conf.d/php54-php.conf
Commented out and restarted Apache and now multiple php versions work as I can now set/use CGI & FCGI modes and selected php 5.4