I upgraded my laptop to mac OS bigsur, it is not at all smooth.
Last thing I found it broke is that I cannot access to localhost anymore:
I searched for a solution but could not find anything but that apache, php and mysql come preinstalled on big sure and everything should run smoothly. it is not.
Situation I have apache and php installed before the upgrade, and don't know how to debug what is wrong. I want to avoid using homebrew ( I am used in using python webservers installed via pip and conda to serve websites, and I fear homebrew messed up with the paths).
I referenced to: https://tech-cookbook.com/2020/11/14/setting-up-your-local-web-server-on-macos-big-sur-11-0-1-2020-mamp-macos-apache-mysql-php/
and https://medium.com/nerd-for-tech/how-to-run-apache-php-on-mac-os-big-sur-7ffbf7cbef7b
I tried to launch apache:
sudo apachectl start
/System/Library/LaunchDaemons/org.apache.httpd.plist: service already loaded
Load failed: 37: Operation already in progress
Mac X does not display a return message.
So I wanted to check the status, from here: https://serverfault.com/questions/297972/osx-how-to-show-apache-status-in-terminal
I tried:
[pid 2444] AH06665: No code signing authority for module at /usr/local/php5/libphp5.so specified in LoadModule directive. Proceeding with loading process, but this will be an error condition in a future version of macOS.
httpd: Syntax error on line 555 of /private/etc/apache2/httpd.conf: Syntax error on line 8 of /private/etc/apache2/other/+php-osx.conf: Cannot load /usr/local/php5/libphp5.so into server: dlopen(/usr/local/php5/libphp5.so, 10): Symbol not found: _unixd_config\n Referenced from: /usr/local/php5/libphp5.so\n Expected in: /usr/sbin/httpd\n in /usr/local/php5/libphp5.so
So I guess Php5 is broken, and apparently mac X fails to load Apache (but I don't get any message and still don't know how to check status like a systemctl status apache
in linux ).
I thought about removing php5 and resintall: https://askubuntu.com/questions/59886/how-to-completely-remove-php
but the solutions there seem risky to me and worse the situation.
Can you please show how to debug if/where Apache breaks, to successfully connect to localhost, and 'user.local' domain name set up by 'user', and to serve websites in the Sites folder in BigSur, if one has already Apache and Php5 ?
Other info:
apachectl -v
Server version: Apache/2.4.53 (Unix)
Server built: Apr 26 2022 20:36:30
php -v
WARNING: PHP is not recommended
PHP is included in macOS for compatibility with legacy software.
Future versions of macOS will not include PHP.
PHP 7.3.29-to-be-removed-in-future-macOS (cli) (built: Sep 6 2021 05:14:39) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.29, Copyright (c) 1998-2018 Zend Technologies