【问题标题】:Xdebug Profiler not working over apacheXdebug Profiler 无法在 apache 上工作
【发布时间】:2017-06-30 05:12:56
【问题描述】:

问题是,如果我通过浏览器从服务器请求任何页面,我不会从 Xdebug-Profiler 获得任何输出。如果我在终端中使用 php 调用脚本,例如

php /var/www/html/index.php

然后将创建分析器的输出。所以我想我的配置很好。这是我 phpinfo 中的重要设置:

xdebug.profiler_aggregate   Off Off
xdebug.profiler_append  Off Off
xdebug.profiler_enable  On  On
xdebug.profiler_enable_trigger  Off Off
xdebug.profiler_enable_trigger_value    no value    no value
xdebug.profiler_output_dir  /home/duser/profiler /home/duser/profiler
xdebug.profiler_output_name testgrind.out.%t-%s testgrind.out.%t-%s

https://xdebug.org/wizard.php 我的 phpinfo 的输出:

Xdebug 安装:2.5.4 服务器 API:Apache 2.0 处理程序 窗户:没有 Zend 服务器:没有 PHP版本:5.6.30 Zend API 编号:220131226 PHP API 编号:20131226 调试构建:否 线程安全构建:否 配置文件路径:/etc 配置文件:/etc/php.ini 扩展目录:/usr/lib64/php/modules 您已经在运行最新的 Xdebug 版本

我在这里阅读了很多主题,人们有类似的问题,通常是权利问题。因此,我在我的主目录中创建了 profiler 文件夹,其权限如下:

   drwxrwxrwx   2 duser duser  140 30. Jun 07:02 profiler

服务器在 Centos 7 上运行,SELinux 被禁用。 Xdebug 调试器工作正常。任何帮助将不胜感激。

【问题讨论】:

  • stackoverflow.com/questions/37873836/… 我读到,有两个php.inis - 一个用于php,一个用于apache。但是 Phpinfo 显示了当前的设置,不是吗?无论如何,我在 httpd.conf 中也使用 php_value 设置了上述设置,但它没有改变任何东西。

标签: php xdebug xdebug-profiler


【解决方案1】:

问题是,apache 无法访问我的 /home/duser/profiler 文件夹。 xdebug 的输出必须保存在 /var/www/html/ 或配置需要调整,以便 apache 可以访问特定路径。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-09-03
    • 2023-03-24
    • 2013-04-12
    • 2023-03-16
    • 2018-10-11
    • 2013-07-07
    相关资源
    最近更新 更多