XDebug 未加载到 PHP(Vista、Apache 模块)中

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2403675/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 18:52:08  来源:igfitidea点击:

XDebug is not loaded in PHP (Vista, Apache Module)

phpwindowsapachewindows-vistaxdebug

提问by sergtk

I downloaded php_xdebug-2.0.5-5.3-vc9.dll, added at the end of PHP.ini the following line:

我下载了 php_xdebug-2.0.5-5.3-vc9.dll,在 PHP.ini 的末尾添加了以下行:

zend_extension_ts="C:/Program Files/php5/ext/php_xdebug-2.0.5-5.3-vc9.dll"

When I use phpinfo(), xdebug is not loaded.

当我使用 phpinfo() 时,没有加载 xdebug。

When I run command "php.exe -m", it not loaded as well.

当我运行命令“php.exe -m”时,它也没有加载。

How can this be resolved?

如何解决这个问题?

My configuration: PHP 5.3.1, Apache 2.2.14 with Apache Module, OS: Windows Vista Both php and xdebug are thread safe.

我的配置:PHP 5.3.1,带有 Apache 模块的 Apache 2.2.14,操作系统:Windows Vista php 和 xdebug 都是线程安全的。

This is somewhat similar with: Apache not loading Xdebug, but does when started from the Command Line

这有点类似于: Apache not loading Xdebug, but do when when start from the Command Line

EDIT:

编辑:

I use VC6 dll and fixed configuration:

我使用 VC6 dll 和固定配置:

zend_extension="C:/Program Files/php5/ext/php_xdebug-2.0.5-5.3-vc6.dll"

Still can not find xdebug in phpinfo() output.

仍然无法在 phpinfo() 输出中找到 xdebug。

回答by Brock Batsell

zend_extension_tsis deprecated on >5.3. Try it with zend_extensioninstead.

zend_extension_ts在 >5.3 上已弃用。试试吧zend_extension

回答by vagustolga

use zend_extension instead of zend_extension_ts

使用 zend_extension 而不是 zend_extension_ts

and look carefuly "Compiler" , "Thread Safety" , "Architecture" and PHP Version parameters in phpinfo()

并仔细查看 phpinfo() 中的“编译器”、“线程安全”、“架构”和 PHP 版本参数

example my php info say

例如我的 php 信息说

PHP Version 5.3.1

PHP 版本 5.3.1

Compiler MSVC6 (Visual C++ 6.0)

编译器 MSVC6 (Visual C++ 6.0)

Architecture x86

架构 x86

Thread Safety enabled

启用线程安全

so i used Xdebug 2.1.0 / 5.3 VC6 (32 bit)

所以我使用了 Xdebug 2.1.0 / 5.3 VC6(32 位)

回答by Almer

I have the exact same problem on Windows 7 too. It didn't work for me but perhaps for you it does. Xdebug has a special service page which helps you find out which version to download and what steps to take: http://www.xdebug.org/find-binary.php.

我在 Windows 7 上也有完全相同的问题。它对我不起作用,但也许对你有用。Xdebug 有一个特殊的服务页面,可以帮助您找出要下载的版本以及要采取的步骤:http: //www.xdebug.org/find-binary.php

Following this didn't work for me unfortunatly. When I perform 'php -m' xdebug does not appear in the loaded modules list.

不幸的是,遵循这一点对我不起作用。当我执行 'php -m' 时,xdebug 没有出现在加载的模块列表中。

回答by Androideur

perform php --inito check witch config file is loaded.
if you have something like this :

Loaded Configuration File: (none)
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)

Just copy your php.iniin windowsdirectory ;)

执行php --ini以检查女巫配置文件是否已加载。
如果你有这样的东西:

加载的配置文件:(无)
扫描额外的 .ini 文件:(无)
解析的额外 .ini 文件:(无)

只需将你的php.ini复制到windows目录中;)

回答by Pascal MARTIN

You should probably not use the VC9version, but the VC6.

您可能不应该使用该VC9版本,而是使用VC6.

For more informations, see the block "Which version do I choose?" in the left-sidebar of http://windows.php.net/which states (quoting):

有关更多信息,请参阅http://windows.php.net/左侧栏中的“我选择哪个版本?”块,其中说明(引用)

If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP

If you are using PHP with IIS you should use the VC9 versions of PHP

Do NOT use VC9 version with apache.org binaries

如果您使用来自 apache.org 的 PHP 和 Apache 1 或 Apache2,您需要使用 PHP 的 VC6 版本

如果您在 IIS 中使用 PHP,则应使用 VC9 版本的 PHP

不要将 VC9 版本与 apache.org 二进制文件一起使用


Also, quoting the Installation page of Xdebug's documentation:


另外,引用Xdebug 文档安装页面

From PHP 5.3 onwards, you always need to use zend_extensionand not zend_extension_ts.

从 PHP 5.3 开始,您总是需要使用zend_extension而不是 zend_extension_ts.