xdebug cashgrind.out.* 文件未生成
我正在尝试将 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,这只是另一个恼人的 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 withservice 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.