Skip to content

Error restarting Brew Apache after Switching PHP Versions #39

@i-am-socket

Description

@i-am-socket

I have a problem where I have PHP 5.6 and 7.1 installed along with the Brew httpd server, but only PHP 5.6 will allow the httpd server to start.

If I run brew-php-switcher -s 56 and manually swap the httpd.conf file to load PHP 56, apache starts and all is right with the world.

If I do the same with 71, apache will not start and I will see:
[mpm_prefork:notice] [pid 78837] AH00173: SIGHUP received. Attempting to restart
[core:notice] [pid 78837] AH00060: seg fault or similar nasty error detected in the parent process

in the error logs. Any further attempts to start apache manually through apachectl will not show anything new in the log file. The only difference between the httpd.conf files is:

LoadModule php5_module /usr/local/Cellar/php56/5.6.33_9/libexec/apache2/libphp5.so
vs
LoadModule php7_module /usr/local/Cellar/php71/7.1.14_25/libexec/apache2/libphp7.so

If I swap back to 56, apache starts just fine. I can manually run

brew unlink (56|71)
brew link (71|56)
cp httpd.conf.(71|56) httpd.conf
sudo apachectl restart

and get the same result. Any clues as to what might be wrong here?

Both php56 and php71 were installed with the --with-httpd flags
Now that I've installed the Brew apache server, the default High Sierra apache server has decided it doesn't want to run anymore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions