dongsheng1238 2017-03-28 15:20
浏览 53
已采纳

XDebug没有分析POST

How can I configure XDebug to profile ALL requests, POST, GET, Ajax, with and without query string parameters?

The current configuration (below) is only creating profile (cachegrind.out) files for GET requests and POST requests that don't have query string parameters.

/etc/php5/apache2/conf.d/20-xdebug.ini

zend_extension = /usr/lib/php5/20121212/xdebug.so
xdebug.profiler_enable_trigger = 1
xdebug.profiler_enable = 0
xdebug.profiler_append = 0

conf.d/my.conf

<Directory "/var/www/html/sub">
        # Limit profiling to files in this directory
        RewriteEngine On
        RewriteRule (.*\.php) $1?XDEBUG_PROFILE=1 [QSA,L]
</Directory>

Ubuntu 14.04.5 LTS

PHP Version 5.5.9-1ubuntu4.21

XDebug version 2.5.1

  • 写回答

1条回答 默认 最新

  • doutan1671 2017-05-30 20:40
    关注

    The source of the problem was that the profile file for the POST request was being overwritten by the next request which was a client side redirect. The solution was to use a different profiler output filename

    Ref: https://bugs.xdebug.org/view.php?id=1445

    xdebug.profiler_output_name=cachegrind.out.%s

    Many thanks to the XDebug team.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器