Xdebug not connecting to client?

The xdebug server does not connect to any of the clients on port 9000 , i.e.: Netbeans IDE, debugclient, etc. debugclient is displayed in phpinfo output. These clients continue to wait for a connection to be established. When I try to run a php script from cli, it gives the following warning message:

"PHP warning: module 'xdebug' is already loaded in Unknown on line 0 Port 9000 has been opened and is displayed in the netstat -numeric-port -l command. I have no idea what could go wrong. I checked all the configuration files, everything looks ok. Any help would be appreciated. Section of my configuration files

Linux abc.localdomain 3.1.1-2.fc16.x86_64 #1 SMP Mon Nov 14 15:46:10 UTC 2011 x86_64 This program makes use of the Zend Scripting Language Engine: Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies with Xdebug v2.1.2, Copyright (c) 2002-2011, by Derick Rethans [Zend] zend_extension=/usr/lib64/php/modules/xdebug.so [XDebug] xdebug.remote_enable=On xdebug.remote_autostart=On xdebug.remote_handler=dbgp xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.remote_mode=req xdebug.remote_log=/var/log/xdebug.log 

php_api no. coincides

Xdebug Simple DBGp Client (0.10.0) Copyright 2002-2007 by Derick Rethans. - libedit support: enabled

Waiting for a debug server connection.

This is black magic !!

thanks

+6
source share
2 answers

In fact, Selinux did not allow Httpd to connect to other network resources.

Setting logical for httpd solution to the problem:

 setsebool -P httpd_can_network_connect on 

OS Fedora 16-X_64

+4
source

For me, the solution was

 sudo chcon -R -h -t /path/to/xdebug.so 

means SELinux now allows httpd to execute this shared object.

0
source

Source: https://habr.com/ru/post/902305/


All Articles