php8-apache2: Symbol not found error, because module name changed in PHP8
PHP8 does not work under Apache due to the following error:
* Starting busybox httpd ...
httpd: Syntax error on line 482 of /etc/apache2/httpd.conf: Syntax error on line 1 of /etc/apache2/conf.d/php8-module.conf: Can't locate API module structure `php8_module' in file /var/www/modules/mod_php8.so: Symbol not found: php8_module
* start-stop-daemon: failed to start `/usr/sbin/httpd'
* Failed to start busybox httpd [ !! ]
* ERROR: httpd failed to start
Apparently, in PHP8 the module name changed. In PHP7 it was php7_module, but in PHP8 it is not php8_module, that is what causes the above error. The new naming scheme is without the version number.
Please ensure the file /etc/apache2/conf.d/php8-module.conf has the following change:
FROM
LoadModule php8_module modules/mod_php8.so
TO
LoadModule php_module modules/mod_php8.so
Thank you.