Apache和PHP安装和部署中遇到的问题

Apache和PHP安装和部署中遇到的问题

安装过程参考如下博文:
https://blog.csdn.net/sinat_41883985/article/details/106061125
https://blog.csdn.net/galen2016/article/details/80778662?
但是出现了Apache可以正常运行但localhost无法访问页面的问题!
在这里插入图片描述

解决方法:
其实修改修改着就解决了。。。
注意的是:
1、修改web文件根目录时,一定要将打开安装目录 conf 子目录下的 httpd.conf 文件,修改 DocumentRoot 属性,改为:DocumentRoot “E:/web/php”。
并且还要对相应目录作权限定义,否则会出现无权访问的错误提示。
即将DocumentRoot的下一行,修改为:
<Directory ““E:/web/php”>
Options Indexes FollowSymLinks
AllowOverride None
Allow from all

2、修改端口号时要注意使用的端口号是否已经被占用,一定要在httpd.conf 文件中修改为:ServerName localhost:8888(8888是我的端口号)

3、出现PHP报错问题:PHP Warning: PHP Startup: Unable to load dynamic library 'pgsql’等
原因是原因是这些扩展重复加载,打开php.ini文件,注释掉对应 的扩展就可以了

猜你喜欢

转载自blog.csdn.net/m0_45142084/article/details/108911418