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 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100