Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I changed laragon php version to 8 and after that apache won't run

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
like image 206
Bluekandu Avatar asked Oct 31 '25 21:10

Bluekandu


1 Answers

First of all, update your Apache version.

After go to c:\laragon\etc\apacke2\mode_php.conf

change: LoadModule php8_module to LoadModule php_module

The overall change:

From this:

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

so php8_module will be php_module

reference

like image 70
Raskul Avatar answered Nov 02 '25 18:11

Raskul



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!