I have a server running CentOS7, PHP7.0.7 with php-fpm, and SELinux. I am trying to debug a PHP script running on that server. And I have a Mac machine that runs PHPstorm where I intend to do the debugging.

I followed this guide to Phpstorm.

Here's what I did:

1) installed xdebug to server

2) set xdebug config as follows:

3) set ssh config to have: AllowTcpForwarding yes (I then reverted it as it did not help)

4) restarted php-fpm, sshd, and httpd

5) in my local terminal, open ssh connection to server with -R flag specified
$ ssh -R 9099:localhost:9099 user@host

6) Changed xdebug config in my phpstorm to listen to port 9099 and set a breakpoint in index.php

7) Opened website in my browser

But still my local xdebug does not stop at the breakpoint.

What could I be missing in this config?

Could it be SElinux that prevents debugging?

1 Answer 1


old question, but im gonna leave this here nonetheless,
since it might at least help someone with troubleshooting

setsebool -P httpd_execmem 1

When enabled, this Boolean allows httpd to execute programs that require memory addresses that are both executable and writeable. Enabling this Boolean is not recommended from a security standpoint as it reduces protection against buffer overflows, however certain modules and applications (such as Java and Mono applications - and as i learned today, xdebug) require this privilege.

  • could you please expand - where should this be added?
    – Vasily802
    Aug 30, 2018 at 3:31
  • 1
    setsebool is a selinux command, you should be able to just run it in a terminal, see man page
    – csminb
    Aug 30, 2018 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.