Cannot start service apache on laragon

Viewed 8100

Everything was ok before. Today I tried to start laragon apache and I got the following error :

httpd: Syntax error on line 546 of

C:/laragon/bin/apache/httpd-2.4.35-win64-VC15/conf/httpd.conf:

Syntax error on line 1 of

C:/laragon/etc/apache2/fcgid.conf: Cannot load

C:/laragon/etc/apache2/modules/mod_fcgid-2.3.9-Win32-VC14.so

into server: %1 is not a valid Win32 application.

enter image description here

I have tried to change PHP versions, but it didn't help. What should I do to start apache withour this error?

2 Answers

If you are finding when trying to switch from php7 to php8 on Laragon here is a quick fix goto C:\laragon\etc\apache2

open mod_php.conf on line 2 change php8_module to php_module

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

change this above to

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