php - Not able to Connect to Xdebug on AWS EC2 from Netbeans
I have been trying for days, but not able to xdebug from Netbeans of our PHP project on AWS EC2. I have used Xdebug for years from XAMPP on Windows, but need to debug a problem that I do not have on Windows. I have read many postings on Internet and tried everything I can find but to no avail.
I configured Xdebug settings in php.ini and phpinfo() shows Xdebug is configured correct and latest per http://xdebug.org/wizard.php
After putting the xdebug entries into php.ini, I can get Xdebug trace, but not able to see anything written to the xdebug.remote_log file. I saw a couple entries (says not able to connect to client) in the log file from my testing a few days ago, but not able to see anything written to it in the last couple days. Even if there is some kind of problem from EC2 to my Window, I certainly expect to see some log entries made in the log file. I can telnet from ec2 to my Windows and connect on port 9000. I can also see the telnet packets from a sniffer trace captured from the Windows machine for the telnet, but no packets from Xdebug. It looks that the xdebug on EC2 never tried to make a connection to Windows. Is there some other ways I can tell Xdebug is trying to connect to my Windows? What are some of the problems that could prevent Xdebug from tring to reach out?
on /etc/services file, I see something on port 9000 cslistener, is that something I need to worry about? I do not see a cslistener process and have not tried to change xdebug to another port, which might have problem of its own....
After I click debug on Netbeans, all I can see is Waiting For Connection (netbeans-xdebug)
Below are my xdebug entries in php.ini.
[Xdebug]
zend_extension="/usr/lib64/php/modules/xdebug.so"
;xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.idekey="netbeans-xdebug"
xdebug.remote_connect_back=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=reg
;xdebug.remote_host=111.111.111.111
xdebug.remote_port=9000
xdebug.auto_trace=On
xdebug.trace_output_dir=/home/log
xdebug.remote_log=/tmp/xdebug_remote_log.log
Your help and advice are greatly appreciated!