简体   繁体   English

(Apache:无法加载模块)httpd:C:/Apache24/conf/httpd.conf:Cannot load C:/php/php7apache2_4.Z0619AFZ31224AB5248C 的第 539 行出现语法错误

[英](Apache : couldn't load module) httpd: Syntax error on line 539 of C:/Apache24/conf/httpd.conf:Cannot load C:/php/php7apache2_4.dll into server:

httpd: Syntax error on line 539 of C:/Apache24/conf/httpd.conf: Cannot load C:/php/php7apache2_4.dll into server:The specified module could not be found

I am new to apache and php.我是 apache 和 php 的新手。 I did everything till restarting it.我做了一切,直到重新启动它。 I installed it in C driver.我将它安装在 C 驱动程序中。 When i try to restart it this happens.当我尝试重新启动它时,会发生这种情况。

line 539:第 539 行:

LoadModule php7_module "C:/php/php7apache2_4.dll"

also I don't actually understand the terms.我也不太明白这些条款。 So can you explain a little more clearly please?那你能解释清楚一点吗?

thanks in advance提前致谢

Apache is a webserver. Apache 是一个网络服务器。 And it uses several modules, roughly similar to plugins to do the work it was programmed to do.它使用几个模块,大致类似于插件来完成它被编程完成的工作。

Your case the error it has thrown is that, the module you have asked apache to load is not found by it .你的情况它抛出的错误是,你要求 apache 加载的模块没有被它找到 Hence it has thrown the error.因此它抛出了错误。

Going by the error, apache seems to have a conflict with your php installation, which has lead to failure in your case.由于错误,apache 似乎与您的 php 安装有冲突,这导致您的情况失败。 Because you have not menitoned your web server architecture, i am assuming that you built a server around apache and php.因为你还没有提到你的 web 服务器架构,我假设你围绕 apache 和 php 构建了一个服务器。

You can try to reinstall php, add essential php extensions for apache-php linkage and try to rectify in case you're building the server.您可以尝试重新安装 php,为 apache-php 链接添加必要的 php 扩展,并尝试纠正以防您正在构建服务器。

Below resources can help you in the process:以下资源可以在此过程中为您提供帮助:

Cannot load C:/php/php7apache2_4.dll into server: %1 is not a valid Win32 application 无法将 C:/php/php7apache2_4.dll 加载到服务器中:%1 不是有效的 Win32 应用程序

How to enable php7 module in apache? 如何在 apache 中启用 php7 模块?

I faced a similar problem.我遇到了类似的问题。 After installing php 8.0 on Win 32 OS and Apache 2.4.在 Win 32 OS 和 Apache 2.4 上安装 php 8.0 后。 I tried to link php to apache by adding the php module to httpd.conf file of apache.我尝试通过将 php 模块添加到 ZB6EFD606D118D0F04620 的 httpd.conf 文件中,将 php 链接到 apache。 I added the code below to httpd config file.我将下面的代码添加到 httpd 配置文件中。

# PHP8 module
PHPIniDir "C:/PHP"
AddType application/x-httpd-php .php
LoadModule php8_module C:/PHP/php8apache2_4.dll**

After which I tried to restart apache and got an error message in the Apache log error file.之后我尝试重新启动 apache 并在 Apache 日志错误文件中收到错误消息。 Apache refused to start and kept displaying and error message too. Apache 拒绝启动并一直显示和错误消息。

httpd.exe: Syntax error on line 519 of C:/Program Files/Apache Software Foundation/Apache2.4/conf/httpd.conf: Cannot load C:/Program Files/Apache Software Foundation/Apache2.4/modules/php7apache2_4.dll into server: %1 is not a valid Win32 application.

I fixed the error by doing the following.我通过执行以下操作修复了错误。 It appears in Apache 2.4 httpd configuration file, php8_module has to be replaced with simply php_module without any number.它出现在 Apache 2.4 httpd 配置文件中, php8_module必须简单地替换为没有任何编号的php_module The code below fixed the error and apache started successfully after modifying the C:\Program Files\Apache Software Foundation\Apache2.4\conf\mime.types file.下面的代码修复了错误,修改 C:\Program Files\Apache Software Foundation\Apache2.4\conf\mime.types 文件后,apache 启动成功。

# PHP 8.0
PHPIniDir "c:/php"
LoadModule php_module "c:/php/php8apache2_4.dll" 

Add the following line to the end of the mime.types config file将以下行添加到 mime.types 配置文件的末尾

application/x-httpd-php php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 C:/Apache24/conf/httpd.conf: 无法将 c:/php7/php7apache2.dll 加载到服务器:找不到指定的模块 - C:/Apache24/conf/httpd.conf: Cannot load c:/php7/php7apache2.dll into server: The specified module could not be found 使用PHP配置apache httpd.conf文件 - Configuring apache httpd.conf file with PHP WAMP无法启动:获取“ AH00526:C:/wamp/bin/apache/Apache2.4.4/conf/httpd.conf的第224行的语法错误” - WAMP won't start: Getting “AH00526: Syntax error on line 224 of C:/wamp/bin/apache/Apache2.4.4/conf/httpd.conf” Wamp服务器:更改Apache的httpd.conf吗? - Wamp server: Changing httpd.conf for apache? 如何通过httpd.conf在Apache2上激活PHP - How to activate PHP on Apache2 by httpd.conf apache2.conf和httpd.conf - apache2.conf and httpd.conf 无法将 C:/php/php7apache2_4.dll 加载到服务器中:%1 不是有效的 Win32 应用程序 - Cannot load C:/php/php7apache2_4.dll into server: %1 is not a valid Win32 application Apache 2.2 phpinfo()配置文件(php.ini)路径与httpd.conf不匹配 - Apache 2.2 phpinfo() Configuration File (php.ini) Path doesn't match httpd.conf 设置php.ini,my.cnf和httpd.conf(apache2.conf)字符集有什么害处吗? - Any harm in setting php.ini, my.cnf and httpd.conf (apache2.conf) charsets? 编辑 httpd.conf 以在 mac 上使用 apache 服务器 - Editing httpd.conf to use apache server on mac
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM