2

I am setting up a production server: CentOS 6.5, Apache, php 5.5, no panel. php is definitely running:

php -v
PHP 5.5.30 (cli) (built: Oct 16 2015 09:21:15)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend 

...but when I browse to a php page (both wordpress and phpmyadmin) the php code is being output as content rather than executed. I tried adding an AddType to httpd.conf, but that just changed the output to a file download prompt. This usually works "out of the box". Note: I used the default php install at first and then upgraded to 5.5 by adding the webtatic rpm There is no php-related file in /etc/httpd/conf.d

  • ok, when I use `which php` I get `/usr/bin/php` - so instructions on how to get it to load as an apache module are not working. Should I uninstall php and start over, or can I configure apache to use that version? – Richard Grevers Nov 15 '15 at 22:35

2 Answers2

2

Ok, I seem to have solved this:

yum remove php php-common
yum install mod_php

has given me php 5.6 running as an apache module. Now the only problem is that phpMyAdmin doesn't seem to comprehend that 5.6 IS GE 5.5 :-/

0

Seems like Apache isn't configured to run PHP.

Try out these solutions: Apache shows php code instead of executing

Community
  • 1
  • 1
nico
  • 123
  • 1
  • 7
  • I had already looked at that q but disregarded it as being about MAMP installation. Problem is I have no php.so in /etc/httpd/modules, so adding LoadModule directives will only break things. I removed and reinstalled php but still ended up with the cgi version, and `yum mod_php` tells me it is already installed. – Richard Grevers Nov 15 '15 at 22:56