Christopher Francisco Christopher Francisco - 11 months ago 50
Apache Configuration Question

What's the httpd_module name so that Apache/Httpd works with PHP 5.5?

I've been having some issues installing PHP 5.5 on a CentOS machine using Chef. I was finally able to install it, but when I access the

it just download a file with the content.

I'm guessing it's because Apache (technically Httpd, as I'm with CentOS) doesn't have

I installed PHP using php cookbook with the following packages:

# ... code to add webtatic repository to yum

node.set['php']['packages'] = ['php55w', 'php55w-devel', 'php55w-cli', 'php55w-snmp', 'php55w-soap', 'php55w-xml', 'php55w-xmlrpc', 'php55w-process', 'php55w-mysqlnd', 'php55w-pecl-memcache', 'php55w-opcache', 'php55w-pdo', 'php55w-imap', 'php55w-mbstring']

If I'm right, the code above didn't install
. The following is my web chef recipe:

httpd_service 'apps' do
mpm 'prefork'
action [:create, :start]
listen_ports ['80', '443']

# ... code for virtual hosts

# Install the mod_php Apache module.
# httpd_module 'php' do
# instance 'apps'
# end

I had the
httpd_module 'php'
directive uncommented when using PHP 5.4. What's the correct name for the http_module to work with PHP 5.5?

Answer Source

It looks like you've found one of the people who went the Debian route and set their packages up as php55- instead of php-. That makes things a pain if you want to go from 5.5 to any higher version, because you're having to uninstall those and install the new ones (i.e. php70-).

Instead I recommend switching your recipe to the Remi repo and use the php- packages.

All that having been said, php55w is your base PHP package. I don't see a php55w-common package tho. Try adding that (or php-common) and that should get it into Apache.