4

I changed laragon php version to 8 and after that apache won't run Here is the error:

Service apache can not start C:/laragon/bin/apache/httpd-2.4.46vs16/conf.... Syntax error on line 2 Api module structure php8_module error
Bluekandu
  • 56
  • 1
  • 6

1 Answers1

7

first of all, update your apache version too.

after that go to c:\laragon\etc\apacke2\mode_php.conf

change:

# This file is auto-generated, so please keep it intact.
LoadModule php8_module "C:/laragon/bin/php/php-8.0.0-Win32-vs16-x64/php8apache2_4.dll"
PHPIniDir "C:/laragon/bin/php/php-8.0.0-Win32-vs16-x64"
<IfModule mime_module>
    AddType application/x-httpd-php .php
</IfModule>

to this:

# This file is auto-generated, so please keep it intact.
LoadModule php_module "C:/laragon/bin/php/php-8.0.0-Win32-vs16-x64/php8apache2_4.dll"
PHPIniDir "C:/laragon/bin/php/php-8.0.0-Win32-vs16-x64"
<IfModule mime_module>
    AddType application/x-httpd-php .php
</IfModule>

so php8_module will be php_module

reference

Raskul
  • 1,674
  • 10
  • 26