【发布时间】:2016-11-22 12:43:54
【问题描述】:
我在 Windows 服务器上有两个 PHP 版本——v5 和 v7。问题是,PHP 7 尝试使用 PHP 5 的 php.ini:
$ php -v
PHP 7.0.2 (cli) (built: Jan 6 2016 12:59:59) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
$ php --ini
Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File: D:\path\to\php5\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)
如何为 PHP 7 设置正确的php.ini?
【问题讨论】:
-
echo %path%是否显示D:\path\to\php5? -
@AbraCadaver 它同时显示 -- PHP5 的路径和 PHP7 的路径:
...D:\path\to\php7\ext\;D:\path\to\php5\ext\;D:\path\to\php7\;D:\path\to\php5\;D:\path\to\php5;...。
标签: php windows-server-2008-r2 configuration-files php-7 php-ini