Home >php教程 >php手册 >配置服务器过程中错误Cannot load php5apache2.dll into server

配置服务器过程中错误Cannot load php5apache2.dll into server

WBOY
WBOYOriginal
2016-06-06 19:58:501585browse

用Apache搭建服务器,Apache的版本为:Apache2.2.25-win32-x86-no_ssl,PHP版本为:php-5.2.6-win32, 编写测试PHP的文件: index.php,内容为: html headtitlephp 测试 /title/head ?php phpinfo(); ? /html 保存在Apache的软件安装目录htdocs文件夹下,

用Apache搭建服务器,Apache的版本为:Apache 2.2.25-win32-x86-no_ssl,PHP版本为:php-5.2.6-win32,

编写测试PHP的文件:index.php,内容为:

php测试

phpinfo();

?>

保存在Apache的软件安装目录htdocs文件夹下,

原先搭建过apache_2.0.55-win32-x86.exe+ php-5.1-Win32.zip的组合,

为了使apache支持php.apache的配置文件httpd.conf中下入以下几行:

ScriptAlias /php/ "C:/php/"

AddType application/x-httpd-php .php3

AddType application/x-httpd-php .php

AddType application/x-httpd-php .phtml

LoadModule php5_module C:/php/php5apache2.dll

但是在重新启动apache的时候,cmd窗口会提示Cannot load php5apache2.dll into server,

错误的原因是:

Apache+PHP的不同组合需要使用不同的dll来进行链接,

需要将LoadModule php5_module C:/php/php5apache2.dll改为:

LoadModule php5_module C:/php/php5apache2_2.dll,

此时重新启动Apache,则可以启动成功。





Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn