HTTPD 24 and PHP 7.0

Posted By Grant Forrest on 16-Oct 2016 at 16:46

I recently built a new CentOS 7 VM using VMWare Player to test some updates to Drupal sites, including the Essential eHealth course.

I wanted the latest of everything so I could test Drupal 8 against Apache 2.4.x, PHP 7.0 and MariaDB 10.1

It was all fairly straightforward..except that the version of Apache that ships in the standard CentOS 7 repos is 2.4.6. This is fairly old so I looked around to see how I could get a later version and install via yum. This proved fruitless but I hit on httpd24 which sounded like I could install and keep updated from the The Software Collections (SCL) repository.

I followed the instructions, restarted Apache and hey presto, I got a new Apache landing page with the Red Hat branding, so I knew I had a new version of Apache running. Unfortunately, it seemed to be serving my pages out of a toally different location, (you can look it up but the path is under the /opt/rh folder). I made a few tweaks to get my home directory back to /var/www/html but I hit another snag when I tried to serve some PHP pages. There was clearly something awry with the PHP interpreter. Step 1 was to restore my php.conf file to the new /conf.d folder. Still no luck. Next I looked to see if the apache PHP module was actually there in the modules path. I was a bit surprised to see it wasn't, so I copied it from the existing (old httpd) modules folder and restarted.

Next I got a service start up error telling me that my php_value directives in php.conf were causing trouble. I need to look into this one further but in the interests of getting back up and working I just commented them out and bingo, apache started okay and served PHP pages.

Seems odd that httpd24 doesn't ship with PHP 7 modules but I thought I'd post this in case anyone else is stuck at the same point.

 

0 comment(s)


Post a Comment

show all blogs