我有个奇怪的问题。我设置了XDebug来分析我们正在开发的一个PHP应用程序。我相信所有的设置都是正确的,但是当我运行它的时候没有得到任何输出。我的配置如下所示:
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so
[XDebug]
xdebug.profiler_append = 1
xdebug.profiler_enable = 0 (I've tried this both on and off)
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "/debug/xdebug/profiler_output_dir"
xdebug.profiler_output_name = "cachegrind.out.%p"所有的phpinfo()设置都像它们应该匹配的那样匹配。输出目录的权限现在设置为777,这样我就可以测试它了。我也尝试过使用public_html下的目录,但没有成功。我用来启动分析器的URL是:
http://example.com/my_page.php?XDEBUG_PROFILE
-or-
http://example.com/my_page.php?XDEBUG_PROFILE=1两者都不起作用。任何帮助都将不胜感激!这个应用程序有5-6秒的页面加载时间,我还无法通过代码来跟踪它。
发布于 2010-08-22 20:50:27
注释掉xdebug.profiler_output_dir和xdebug.profiler_output_name,看看是否可以在/tmp/下找到输出。
发布于 2014-10-23 15:50:21
在一些发行版上,/tmp文件夹也有问题,我无法在centos7上获得输出,然后我找到了this
所以,我设置了
xdebug.profiler_output_dir=/home/jirka/profile
chmod 777 /home/jirka/profile和它现在就好了。
发布于 2011-12-20 20:23:58
此问题的另一个可能原因是profiler_output_dir文件夹的权限。
为组和所有者添加写权限解决了我的问题:
sudo chmod go+w /home/dimitris/cachegrind/https://stackoverflow.com/questions/3450500
复制相似问题