xdebug cashgrind.out.* 文件未生成

发布于 2024-12-22 08:52:21 字数 699 浏览 6 评论 0原文

我正在尝试将 xdebug 放在 centOS Web 服务器上,并使用其分析功能来准备将放在其上的 php 代码。目前我已经运行并安装了 apache,我安装了所有必要的 php 东西,还运行 pecl install xdebug 来安装 xdebug。我还使用 zend_extension=/usr/lib/php/modules/xdebug.so 行修改了 php.ini 文件,现在当我运行 php -m xdebug 时显示据我了解,它应该放在“常规模块”和“zend 模块”中。这是我的 php.ini 文件的示例:

    zend_extension="usr/lib/php/modules/xdebug.so"

    xdebug.profiler_enable = 1

    xdebug.profiler_output_dir = "/var/www/phplogs/"

在我的 /var/www/html/ 目录中,我有一个 info.php 文件,内容如下: 我重新启动 httpd,然后使用 lynx -dump localhost/info.php(我通过 ssh 连接到 CLI)。运行此命令后,当我 ls /var/www/phplogs 时,文件夹中没有任何内容。想法?

I am trying to put xdebug on a centOS web server and to use its profiling capabilities in preparation for the php code that will be put on it. Currently I have apache running and installed, I installed all of the necessary php things, and also ran pecl install xdebug to install xdebug. I also modified the php.ini file with the line zend_extension=/usr/lib/php/modules/xdebug.so, and now when I run php -m xdebug shows up in "regular modules" and "zend modules", as I understand it's supposed to. Here's a sample of my php.ini file:

    zend_extension="usr/lib/php/modules/xdebug.so"

    xdebug.profiler_enable = 1

    xdebug.profiler_output_dir = "/var/www/phplogs/"

In my /var/www/html/ directory, I have an info.php file that reads:
<?php phpinfo();?>
I restart httpd, and then use lynx -dump localhost/info.php (I'm ssh'd into a CLI). After running this, when I ls /var/www/phplogs there is nothing in the folder. Thoughts?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

指尖微凉心微凉 2024-12-29 08:52:21

事实证明,这只是另一个恼人的 SELinux 问题。 setenforce 0,然后使用 service httpd start 启动 httpd,然后重新打开:setenforce 1。完成此操作后,只要 php.ini 的配置与 OP 中的一样,日志记录应该可以完美地工作。

It turns out this is just another annoying SELinux problem. setenforce 0 before starting httpd with service httpd start and then turn it back on: setenforce 1. After doing this, logging should work flawlessly provided php.ini is configured as it is in the OP.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文