上周将环境php升级到5.5了,当然apache也需要升级到2.4
现在apache2.4不用安装压缩包下载直接用,方便。
加载php5.5
LoadModule php5_module "D:/Webconfig/php-5.5.25/php5apache2_4.dll"
PHPIniDir "D:/Webconfig/php-5.5.25"
AddType application/x-httpd-php .php .html .htm
在配置apache2.4+php5.5的过程中当然也遇到一些错误
1、libssh2.dll 不存在,需要将php5.5目录下的libssh2.dll复制到windows目录下。
2、AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::
首先找到ServerName(约213行),将其设置为localhost:80,并将前面的井号删除,虽然这一步如果不修改的话也可以正常运行,但启动Apache服务时会有一条烦人的提示(AH00558: httpd.exe: Could not reliably determine the server's fully qualified do main name, using fe80::fc76:abca:e24b:d490. Set the 'ServerName' directive globally to suppress this message),洁癖者还是改一下吧。
3、apache 2.4 You don't have permission to access 查找 Require all denied 修改成: Require all granted
4、32位系统下需要将php添加到环境变量中;D:webconfigphp-5.5.25;D:webconfigphp-5.5.25ext;