windows下PHP环境的搭建:httpd: Syntax error AH00558: httpd: Could not reliably determine the server's fully

https://segmentfault.com/a/1190000003409708

超好用的教程,你值得拥有。

按着这个教程一步一步来就可以了,亲测有效。

这里再说一下我遇到的问题及解决

1.httpd: Syntax error on line 188 of D:/Program Files/wamp/httpd-2.4.39-win64-VC15/Apache24/conf/httpd.conf: Can't locate API module structure `php5_module' in file D:/Program Files/wamp/php-7.3.5-Win32-VC15-x64/php7apache2_4.dll: No error

因为我下载的是PHP7,原文是PHP5,所以不能完全照搬原文的httpd.conf文件配置,需要有一些小的改动,要改成PHP7_module

# 如下为PHP环境添加模块
LoadModule php7_module "D:/Program Files/wamp/php-7.3.5-Win32-VC15-x64/php7apache2_4.dll"
PHPIniDir "D:/Program Files/wamp/php-7.3.5-Win32-VC15-x64/php.ini"

2.AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::6de7:4216:a182:dd69. Set the 'ServerName' directive globally to suppress this message

打开httpd.conf文件,修改如下:

#ServerName www.example.com:80
ServerName localhost:80

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值