php5.4 升级至php5.6遇到到问题

2023-06-15,,

从php5.4升级5.6遇到的问题

安装 php5.6.33 和Apache2.4 都是window 64位
php直接取官网下载

这是apache2.4的下载
http://www.apachelounge.com/download/

升级中遇到的问题 如下:

安装Apache 时 在Apache 的bin目录下 shift+鼠标右键 “在此处打开命令窗口”

运行 “httpd -t” 用于检查Apache 配置是否有错误 结果出现了如下错误:

“Could not reliably determine the server's fully qualified domain ”

这是没有设置服务器名称 解决方法:
在httpd.conf 添加
ServerName localhost:80

基于多域名的主机配置

首先在httpd.conf 开启 virtual host

<VirtualHost *:80>
ServerName www.blog.com
DocumentRoot "G:/WebSite/Blog"

<Directory "G:/WebSite/Blog/">
    #Options FollowSymLinks (不显示目录列表)

    #显示目录列表
    Options Indexes FollowSymLinks
    AllowOverride None
    #允许自动加载的文件
    DirectoryIndex index.html index.php index.htm index.jsp
    #请求权限设置 
    Require all granted
</Directory>

</VirtualHost>

当开启了pdo_mysqli扩展时 php无法加载扩展 找了半天 结果是:
extension_dir 目录写错(英文引号写成中文)