Segmentation fault on mojave http24 + php56


(Redvex) #1

Apache work nice on mojave, but when i try to load phpinfo or any other php file i get:

AH00052: child pid 3745 exit signal Segmentation fault (11)

Any idea?


(Redvex) #2

php from command line works great… so I think that could be a module related problem, but I’ha tried to install from bottle and from source code… so I really don’t know :worried:


(Sean Molenaar) #3

Did you also try reinstalling php?


(Redvex) #4

sure… several times and apache too


(Adam Christianson) #5

I’m seeing similar issues, have you found a fix yet?


(Redvex) #6

I’m using php-osx with native apache right now :worried:


(Vaughan Reid) #7

EDIT: Appears the below was maybe working with the default macOS apache web server. I’ve since installed httpd from Homebrew and am having the same issues you’re describing…

Had similar issues with the following error since upgrading to Mojave and was also getting a segfault:

httpd: Syntax error on line 172 of /private/etc/apache2/httpd.conf: Cannot load /usr/local/opt/php@5.6/lib/httpd/modules/libphp5.so into server: dlopen(/usr/local/opt/php@5.6/lib/httpd/modules/libphp5.so, 10): no suitable image found. Did find:\n\t/usr/local/opt/php@5.6/lib/httpd/modules/libphp5.so: code signature in (/usr/local/opt/php@5.6/lib/httpd/modules/libphp5.so) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.\n\t/usr/local/opt/php@5.6/lib/httpd/modules/libphp5.so: stat() failed with errno=22

Reinstalling php56 with Homebrew normally wasn’t working but I did manage to fix it by compiling the module from source:

 brew uninstall php56
 brew cleanup
 brew update
 brew install php56 --build-from-source

Hope that helps someone!


(Vaughan Reid) #8

Fixed! For me it was Zend Opcache causing the segfault.

Commenting everything out in /usr/local/etc/php/5.6/conf.d/ext-opcache.ini or removing the file solved this.


(Amy) #9

Same here. Thanks for the tip. Killing off opcache solved the problem.


(Dave Hallman) #10

Thank you so much for posting this. I’ve been fighting it for days!

I had been having this issue on Mac 10.13.6 using the pre-installed Apache2 and a brew-installed php@56 binary. For me, it began when I enabled SSL and added:

LoadModule socache_shmcb_module libexec/apache2/mod_socache_shmcb.so

to the configuration file. My Wordpress admin pages would fail to load without having to constantly reload from that point on. Switching back to non-SSL, everything worked fine, but wasn’t a viable option for me.

Installing and building both apache and php from source solved this issue!

Thanks again!


(Aodiogo) #11

this worked fine for me, tks!


(Chuckvincent) #12

many thanks for posing this, fixed my install as well.

new to Homebrew, here because the Mojave update.


(Harald Andertun) #13

Thanks. Commenting out everything in /usr/local/etc/php/5.6/conf.d/ext-opcache.ini made a difference.

But is it a solution? I wan’t to have opcache enabled…


(Peter Haider) #14

Thanks, you’re tip with ext-opcache.ini, saved my day!


(Jason Reljac) #15

After a good bit of frustration and googling I found this and commenting out everything in /usr/local/etc/php/5.6/conf.d/ext-opcache.ini also did the trick for me. Thanks!


(Stefan Frank) #16

Also on my machine (MacOS Mojave 10.14.1) deactivating the opcode cache was the solution. Thank you!


(Sean Molenaar) #17

Gonna close this since deactivating opcache is the solution and we don’t need more posts confirming that.


(Sean Molenaar) #18