On Windows 10 Pro, after downloading PHP 8, switching to it in Laragon (PHP > Version) and restarting Apache, I get the following error:
httpd: Syntax error on line 546 of
C:/laragon/bin/apache/httpd-2.4.35-win64-VC15/con...:
Syntax error on line 2 of
C:/laragon/etc/apache2/mod_php.conf: Can't locate
API module structure 'php8_module' in file
C:/laragon/bin/php/php-8.0.2-Win32-vs16-x64/php8a...:
No error
2
Answers
After a fair bit of head scratching, the fix was fairly simple - in file
C:/laragon/etc/apache2/mod_php.conf
I changed
LoadModule php8_module
toLoadModule php_module
It seems Laragon fouls up the auto-configuration of PHP 8
GOTO
C:/laragon/etc/apache2/mod_php.conf
AND REPLACE THIS
WITH THIS