Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Mark Hamlin's Blog:
Debugging xdebug (tcp, dns, ubuntu, osx, vmware) ((all at once))
Aug 31, 2011 @ 18:04:43

In a recent post to his blog Mark Hamlin talks about some of his difficulties in getting XDebug and Netbeans working together from an OSX machine hitting a Ubuntu server.

For the past 18 months working with PHP, i've primarily used alternatives, not out of preference, but because netbeans xdebug integration consistently failed me. It would (might) work with a remote apache, but would not play with scripts executed remotely from the command line. I could be fairly sure my xdebug config was sound as I no problems with MacGDB and PHPStorm whatsoever.

With a little more investigation, he discovered that it was the OSX firewall causing issues. He found that, with a new incoming connection came a confirmation box to approve the connection. This, of course, wasn't passed along to Netbeans so he never saw it. In the end, he set up a reverse SSH tunnel to bypass the firewall completely (command included).

tagged: debug netbeans firewall xdebug ssh tunnel ubuntu osx

Link:

Derick Rethans' Blog:
Remote Debugging PHP with a Firewall in the Way
Aug 26, 2011 @ 16:24:17

Sometime debugging PHP applications isn't as easy as just pointing your IDE directly at the server and starting to work. Derick Rethans has a new post talking about one such situation, remote debugging with a firewall in between you and the remote machine with XDebug.

The PHP debugging extension Xdebug has "remote" debugging capabilities for single-step debugging PHP applications. This works by setting your favourite IDE into listening mode and instructing Xdebug (with one of the handy browser extensions for example) to initiate debugging. [...] There could however be a firewall in the way that prevents Xdebug connecting directly to your IDE's IP address. That can be because the network you are on employs NAT. [...] In this case, there is no way Xdebug can connect to your IDE's IP address and port. Or is there?

His alternative requires SSH access to the remote machine - building a tunnel from your local machine to the remote server XDebug can use to get around the firewall. He explains the shell command to set up the tunnel and, a more graphical way, through the Putty ssh/telnet client. A quick call to "netstat" can tell you if things are working correctly or not. All that's left then is to point your XDebug to the port on the localhost and you should be good to go on debugging.

tagged: debugging firewall tutorial ssh tunnel xdebug ide

Link:

David Van Couvering's Blog:
Real-world experience with the new NetBeans PHP and JavaScript editors
Aug 14, 2008 @ 14:32:56

David Van Couvering has posted about some of his experience with the latest version of the NetBeans editor for some of his PHP and Javascript development work.

Yesterday I spent the whole day trying to help a friend in need who had waded in too deep with a contract he has. He has no database experience, and was trying to customize a Wordpress plugin that uses PHP, JavaScript and MySQL. So I downloaded the daily build of the PHP bundle of NetBeans for 6.5 and started working.

He happily notes that things like syntax highlighting, inline documentation and completion were still there in the PHP bundle as well. He also mentions a few other things that could come in handy for the IDE - ssh tunnel support (see here), an "Add Column Wizard" and a "Insert DLL Wizard".

tagged: netbeans ide javascript bundle experience ssh tunnel wizard dll sql

Link:


Trending Topics: