Upgraded your PHP from 7 to 8 on your macOS, then you might run into issues trying to start Apache when you run the command:
sudo apachectl start.
The issue is, the dynamic link library of PHP for PHP 8 has been changed and is saved in a different location on your macOS file system.
After upgrading to PHP 8, you will need to comment out the config line for PHP 7 similar to what is below in the file:
sudo nano /usr/local/etc/httpd/httpd.conf
#LoadModule php7_module /usr/libexec/apache2/libphp7.so
and then copy/paste the line below to link to the correct PHP 8 DLL:
LoadModule php_module /usr/local/lib/httpd/modules/libphp.so
Also, note that the module name is not
After doing this, try to start/restart apache again. Hope this helps!
Enjoy, and welcome to PHP 8!