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?
It turns out this is just another annoying SELinux problem.
setenforce 0before starting httpd withservice httpd startand 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.