PHP not interpreting

After I did "yum -y install php54-php*" I am not getting the php files interpreted instead the file is downloading or showing HTML source!

Appreciate help ASAP.

Status: 
Active

Comments

bislinks's picture
Submitted by bislinks on Sat, 09/05/2015 - 16:16 Pro Licensee

The output of "service httpd restart" Stopping httpd: [ OK ] Starting httpd: [Sat Sep 05 16:40:01 2015] [warn] module php5_module is already loaded, skipping [ OK ]

bislinks's picture
Submitted by bislinks on Sat, 09/05/2015 - 18:47 Pro Licensee

Output of "php -v" PHP 5.3.3 (cli) (built: Jul 9 2015 17:39:00) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies [root@ns3 ~]#

bislinks's picture
Submitted by bislinks on Sat, 09/05/2015 - 18:47 Pro Licensee

Output of "ls /etc/httpd/modules | grep php5" is libphp54-php5.so libphp5.so libphp5-zts.so [root@ns3 ~]#

bislinks's picture
Submitted by bislinks on Sat, 09/05/2015 - 18:51 Pro Licensee

I had enabled short_open_tag before I got this error, so disabled after I got the error. Still, php files are still showing source code or getting downloaded instead of executing.

bislinks's picture
Submitted by bislinks on Sat, 09/05/2015 - 23:44 Pro Licensee

[root@ns3 ~]# rpm -qa | grep php php-pdo-5.3.3-46.el6_6.x86_64 php54-php-enchant-5.4.16-22.el6.centos.alt.x86_64 php54-php-pear-1.9.4-10.el6.centos.alt.noarch php-embedded-5.3.3-46.el6_6.x86_64 php-odbc-5.3.3-46.el6_6.x86_64 php54-php-xmlrpc-5.4.16-22.el6.centos.alt.x86_64 php54-php-xml-5.4.16-22.el6.centos.alt.x86_64 php-pecl-memcache-3.0.5-4.el6.x86_64 wbm-php-pear-1.5-1.noarch php-soap-5.3.3-46.el6_6.x86_64 php54-php-pspell-5.4.16-22.el6.centos.alt.x86_64 php-pecl-apc-3.1.9-2.el6.x86_64 php-imap-5.3.3-46.el6_6.x86_64 php54-php-devel-5.4.16-22.el6.centos.alt.x86_64 php54-php-ldap-5.4.16-22.el6.centos.alt.x86_64 php54-1.1-5.el6.centos.alt.x86_64 php-enchant-5.3.3-46.el6_6.x86_64 php-mysql-5.3.3-46.el6_6.x86_64 php-gd-5.3.3-46.el6_6.x86_64 php-mcrypt-5.3.3-1.el6.x86_64 php54-php-5.4.16-22.el6.centos.alt.x86_64 php54-php-bcmath-5.4.16-22.el6.centos.alt.x86_64 php54-php-cli-5.4.16-22.el6.centos.alt.x86_64 php54-php-mysqlnd-5.4.16-22.el6.centos.alt.x86_64 php-process-5.3.3-46.el6_6.x86_64 php-pear-1.9.4-4.el6.noarch php-common-5.3.3-46.el6_6.x86_64 php54-php-recode-5.4.16-22.el6.centos.alt.x86_64 php54-php-tidy-5.4.16-22.el6.centos.alt.x86_64 php54-php-odbc-5.4.16-22.el6.centos.alt.x86_64 php-bcmath-5.3.3-46.el6_6.x86_64 php-intl-5.3.3-46.el6_6.x86_64 php54-php-imap-5.4.16-22.el6.centos.alt.x86_64 php54-runtime-1.1-5.el6.centos.alt.x86_64 php54-php-pecl-memcache-3.0.8-3.el6.centos.alt.x86_64 php54-php-gd-5.4.16-22.el6.centos.alt.x86_64 php-fpm-5.3.3-46.el6_6.x86_64 php-dba-5.3.3-46.el6_6.x86_64 php-cli-5.3.3-46.el6_6.x86_64 php-xmlrpc-5.3.3-46.el6_6.x86_64 php54-php-soap-5.4.16-22.el6.centos.alt.x86_64 php54-php-intl-5.4.16-22.el6.centos.alt.x86_64 php54-php-pecl-zendopcache-7.0.2-4.el6.centos.alt.x86_64 php54-php-process-5.4.16-22.el6.centos.alt.x86_64 php-zts-5.3.3-46.el6_6.x86_64 php-xml-5.3.3-46.el6_6.x86_64 php54-php-pecl-apc-devel-3.1.15-0.4.20130912.el6.centos.alt.x86_64 php54-php-pgsql-5.4.16-22.el6.centos.alt.x86_64 php-recode-5.3.3-46.el6_6.x86_64 php-snmp-5.3.3-46.el6_6.x86_64 php54-php-pecl-apc-3.1.15-0.4.20130912.el6.centos.alt.x86_64 php54-php-dba-5.4.16-22.el6.centos.alt.x86_64 php-pspell-5.3.3-46.el6_6.x86_64 php54-php-fpm-5.4.16-22.el6.centos.alt.x86_64 php54-php-pdo-5.4.16-22.el6.centos.alt.x86_64 php-tidy-5.3.3-46.el6_6.x86_64 php-pgsql-5.3.3-46.el6_6.x86_64 php54-php-snmp-5.4.16-22.el6.centos.alt.x86_64 php54-php-common-5.4.16-22.el6.centos.alt.x86_64 php-ldap-5.3.3-46.el6_6.x86_64 [root@ns3 ~]#

bislinks's picture
Submitted by bislinks on Sat, 09/05/2015 - 23:48 Pro Licensee

Thanks, the solution in FAQ fixed the problem.

We've had really good luck with the packages from the SCL repo before, which it looks like is what you're using there.

So I'm not quite sure which of those was the one that caused the issue -- SCL should be safe to use.

We'll do some additional testing on that so we can provide better assistance in the future by knowing which package causes the issue.

Thanks for letting us know how you fixed it up!