Topic: centos 7.4, php 7.0.29 , apache 2.4 segmenttion fault

on a centos 7.4 , kernel: 3.10.0-693.21.1 , apache ,
I installed php70-phpxx  packages with mod_php , versione 7.0.29-1

apache exit with segmentation fault on startup.
error message:
Apr  5 18:02:08 myserver kernel: httpd[21469]: segfault at 1d ip 00007f310b20fcae sp 00007ffe905c7da0 error 4 in[7f310afc3000+36e000]


Re: centos 7.4, php 7.0.29 , apache 2.4 segmenttion fault


my mistake

on server I installed also php56 packages
in an apache configuration include file, there was the load of the php56 module after the load of php70 module

if I try to load php56 after php70 , apache crash
if I try to load php70 after php56 , apache start with php56

not try to load both version of php or
wrapping the php5 load module in file 10-php56-php.conf   with  <IfModule !mod_php7.c>
solve the problem


Re: centos 7.4, php 7.0.29 , apache 2.4 segmenttion fault

I don't understand how this is possible

All php 5 packages provides a /etc/httpd/conf.modules.d/10-xxx.conf
All php 7 packages provides a /etc/httpd/conf.modules.d/15-xxx.conf

So php 7 configuration file is always read after php 5 one, so the <IfModule !mod_php5.c> should be enough.

BTW, in all case, only one version of mod_php can be loaded in apache, so it doesn't make sense to install various versions.

If you need various versions, you have to use FPM.
Read … tion-tips/

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 28 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: centos 7.4, php 7.0.29 , apache 2.4 segmenttion fault

Thank Remi
yeah . with load module you provided php70 is always loded after php5, and I known that I can't load and use php5 and php7 together.
i use sometimes a mixed configuration of php5 and php7 with fastcgi fccgi.

In the case I described I used on a new development server configurations file grabbed from 2 production server where the standard load module was disabled and load php from other include files . So the mixed configuration and the problem i run in .

apachectl crashed and I was not able to detect the misconfiguration without some troubles,  so my suggestion for other users that can run the same error