2

当我从命令行(在 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 Files (x86)\AMD APP\bin\x86;C:\Program Files\Common Files\Microsoft Shared\Windows s Live;C:\Program Files (x86)\Common Files\Microsoft Shared\ Windows Live;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\ v1.0\;C:\Program Files (x86)\Calibre2\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\Windows Live\Shared;C:\Program文件 (x86)\ATI Technologies\ATI.ACE\Core-Static;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 目录的上方,并尝试了上述行的一些变体,但我无法摆脱此错误消息。

有任何想法吗?

4

2 回答 2

2

如果您使用的是 window.js,让我们尝试使用 zend_extension_tc 而不是 zend_extension。

于 2014-05-26T03:35:24.577 回答
2

EasyPHP 中的常规命令行 PHP 无法正常工作。问题是 EasyPHP 用PATH自己的变量替换了变量。这只是愚蠢的,它不使用不同的变量。

但是,经过一些实验,以下内容对我有用。我创建了一个批处理文件php5.bat并将其放入以便于C:\Windows\Sytem32访问,使用以下代码(C:\Program Files (x86)\EasyPHP-12.1\php\php548x121030011600我的 easyPHP php.exe 所在的位置在哪里)。

@echo off
REM Set the path for easy PHP and then start PHP.
set OLD_PATH=%PATH%
set PATH=C:\Program Files (x86)\EasyPHP-12.1
set PHP_DIR=C:\Program Files (x86)\EasyPHP-12.1\php\php548x121030011600
call "%PHP_DIR%\php.exe" -c "%PHP_DIR%\php.ini" %*
set PATH=%OLD_PATH%
@echo on

然后调用批处理文件php5 -v将为您提供 php 版本。您可能需要将 Apache 文件夹中的一些 DLL 复制到 PHP 文件夹中,因为它会提示找不到 DLL。

于 2012-10-30T08:13:27.747 回答