我将 laragon php 版本更改为 8,之后 apache 将无法运行,这是错误:
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
首先,也更新你的apache版本。
之后转到 c:\larragon tc packe2\mode_php.conf
改变:
# 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>
对此:
# 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>
所以
php8_module
将是php_module