Xdebug problems with SELinux
How to know SELinux enabled for apache:
check in apache error_log for the following statemetn
[notice] SELinux policy enabled; httpd running as context user_u:system_r:httpd_t:s0
Xdebug not getting loaded:
Failed loading /usr/lib64/php/modules/xdebug.so: /usr/lib64/php/modules/xdebug.so: cannot open shared object file: Permission denied
Failed loading /usr/lib64/php/modules/xdebug.so: /usr/lib64/php/modules/xdebug.so: cannot open shared object file: Permission denied
Failed loading /usr/lib64/php/modules/xdebug.so: /usr/lib64/php/modules/xdebug.so: cannot open shared object file: Permission denied
Command to be executed
$ getsebool -a|grep httpd_disable_trans
httpd_disable_trans --> off
$ setsebool -P httpd_disable_trans 1
$ getsebool -a|grep httpd_disable_trans
httpd_disable_trans --> on
Now restart the httpd again

check in apache error_log for the following statemetn
[notice] SELinux policy enabled; httpd running as context user_u:system_r:httpd_t:s0
Xdebug not getting loaded:
Failed loading /usr/lib64/php/modules/xdebug.so: /usr/lib64/php/modules/xdebug.so: cannot open shared object file: Permission denied
Failed loading /usr/lib64/php/modules/xdebug.so: /usr/lib64/php/modules/xdebug.so: cannot open shared object file: Permission denied
Failed loading /usr/lib64/php/modules/xdebug.so: /usr/lib64/php/modules/xdebug.so: cannot open shared object file: Permission denied
Command to be executed
$ getsebool -a|grep httpd_disable_trans
httpd_disable_trans --> off
$ setsebool -P httpd_disable_trans 1
$ getsebool -a|grep httpd_disable_trans
httpd_disable_trans --> on
Now restart the httpd again
Comments
Post a Comment