After MacOS High Sierra install, localhost fails and apache has syntax errors

Here an (old) 3rd party PHP probably from entropy.ch was installed to /local/usr/bin/. The Sierra httpd.conf was modified to work with the different PHP (and virtual hosts).

While updating to macOS to High Sierra, the Sierra httpd.conf was backed up to httpd.conf.sierra, a new High Sierra httpd.conf was installed and gained control, but won't work with the custom PHP5.

After backing up the High Sierra httpd.conf to httpd.conf.high_sierra:

sudo mv /private/etc/apache2/httpd.conf /private/etc/apache2/httpd.conf.high_sierra 

reactivating the httpd.conf.sierra:

sudo cp /private/etc/apache2/httpd.conf.sierra /private/etc/apache2/httpd.conf

uncommenting the httpd.conf line

#LoadModule php5_module libexec/apache2/libphp5.so

and changing the version number from 5 to 7 so that it reads:

LoadModule php7_module libexec/apache2/libphp7.so


renaming the custom /local/usr/bin/php to php5:

sudo mv /local/usr/bin/php /local/usr/bin/php5

replacing the soft link /private/etc/apache2/other/+php-osx.conf (linking to /usr/local/php5/entropy-php.conf) with the High Sierra default /private/etc/apache2/other/php7.conf

and removing any reference to the custom PHP5, apachectl configtest was OK and Apache worked again - now with Apple's PHP7.