Joh*_*gen 12 php profiling xdebug
我有一个奇怪的问题.我已经设置了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"
Run Code Online (Sandbox Code Playgroud)
所有phpinfo()设置都应该匹配.输出目录的权限现在设置为777,所以我可以测试它.我也试过使用public_html下的目录,但没有运气.我用来启动探查器的URL是:
http://example.com/my_page.php?XDEBUG_PROFILE
-or-
http://example.com/my_page.php?XDEBUG_PROFILE=1
Run Code Online (Sandbox Code Playgroud)
两者都不起作用.任何帮助将不胜感激!!这个应用程序有5-6秒的页面加载时间,我无法通过代码跟踪它.
Aip*_*hee 13
某些发行版上的/ tmp文件夹也存在问题,我无法在centos 7上获得输出然后我发现了这一点
所以,我已经设定了
xdebug.profiler_output_dir = /家庭/尔卡/ profile文件
设置777,现在好了.
Ham*_*ari 11
注释掉xdebug.profiler_output_dir,xdebug.profiler_output_name看看你是否可以找到输出/tmp/.
此问题的另一个可能原因是profiler_output_dir文件夹的权限.
向组和所有者添加写入权限为我解决了问题:
sudo chmod go+w /home/dimitris/cachegrind/
Run Code Online (Sandbox Code Playgroud)