阿帕奇不加载Xdebug的,而是通过命令行启动时不 [英] Apache not loading Xdebug, but does when started from the Command Line

查看:153
本文介绍了阿帕奇不加载Xdebug的,而是通过命令行启动时不的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这听起​​来很奇怪,但相信我,这是发生了什么。这里是我的系统设置:

I know that this sounds odd, but believe me, it's what is happening. Here are my system settings:

Windows7的结果
Apache 2.2的结果
PHP 5.2.12结果
Xdebug的2.0.5

Windows7
Apache 2.2
PHP 5.2.12
Xdebug 2.0.5

我的XDebug在我的php.ini文件中配置。当我运行PHP -m,我其实看到Xdebug的加载。现在,如果我启动Apache的 AS服务(或由Apache监视器),并运行phpinfo()函数,它没有显示Xdebug的是加载。

I have XDebug configured in my PHP.ini file. When I run php -m, I do in fact see that Xdebug is loaded. Now, if I start Apache AS A SERVICE (or by the Apache Monitor), and run phpinfo(), it is NOT showing Xdebug as being loaded.

不过,(现在,这里的疯狂​​部分),如果我去我的Apache bin目录,并简单地运行httpd.exe,然后去看看phpinfo()函数,的Xdebug现在显示为被加载<! / STRONG>

However, (now here's the crazy part), if I go to my Apache bin directory, and simply run httpd.exe, and then go and look at phpinfo(), Xdebug now shows as being loaded!

此外,一些比较phpinfo()函数时,通过服务或通过命令行启动时,它看起来像php.ini文件是两种情况下是相同的。一切看起来除了Xdebug的被装载的部分是相同的。

Also, comparing some phpinfo() when started via service or by command line, it looks like the php.ini file is the same for either case. Everything looks the same except for the Xdebug being loaded part.

请,如果您有任何想法,将不胜AP preciated。

Please, if you have any ideas it would be greatly appreciated.

推荐答案

最近我碰到了同样的问题,但我有针孔的SELinux以允许xdebug.so模块的httpd访问:

I recently ran into the same issue, but I had to pinhole SELinux to allow httpd access to the xdebug.so module:

chcon -v -R --type=httpd_sys_content_t /path/to/your/xdebug.so

而重新启动httpd和一切工作正常。

Restarted httpd and everything worked as expected.

这篇关于阿帕奇不加载Xdebug的,而是通过命令行启动时不的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆