【发布时间】:2012-07-27 11:19:35
【问题描述】:
当我从命令行(在 Windows 上)运行 php 时,我收到以下消息
加载失败 C:\Users\Nickey K\Documents\AMD APP\bin\x86_64;C:\Users\Nickey K\ Documents\AMD APP\bin\x86;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program F 文件 (x86)\AMD APP\bin\x86;C:\Program Files\Common Files\Microsoft Shared\Window s Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Prog ram 文件 (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C :\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program F 文件 (x86)\Calibre2\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core- 静态;C:\Program Files (x86)\EasyPHP-12.0\php\php544x120715104042;\php\php544x1 20715104042\php_xdebug-2.2.0-5.4-vc9.dll
x_debug 好像是根据phpinfo正确安装的,我在php.ini中有下面这行
zend_extension = "C:\Program Files (x86)\EasyPHP-12.0\php\php544x120715104042\php_xdebug-2.2.0-5.4-vc9.dll"
我已将 dll 文件放在 ...\ext 目录的上方,并尝试了上述行的一些变体,但我无法摆脱此错误消息。
有什么想法吗?
【问题讨论】:
-
啊,是的,EasyPHP。具有讽刺意味的发行版之一...看起来像
%PATH%环境变量的全部内容,您是否在配置文件中的任何地方按名称使用过? -
是的。那是PATH环境变量。不确定它是否意味着默认转储整个事情。但我并没有真正改变。 Easyphp 使用 ${path} 作为它的安装路径,但我不得不用绝对路径替换它们以消除所有丢失的扩展错误。 xdebug 是唯一剩下的错误消息
-
如果你比较浏览器中
phpinfo()和命令行中php -i的结果,它们使用的是同一个ini文件吗? -
不同的文件,但似乎有相同的配置。我认为 PHP 会在服务器重新启动时复制它。这两个文件在我的开篇文章中都有相同的 zend_extension 行。
-
放弃了easyphp,改用统一服务器。没有对配置做任何更改,但至少从命令行执行 php 到目前为止不会抛出错误。