PHP: External Debugging With Sockets Support

Usually, when debugging a PHP script, the easiest method is using echo statements to write variables to the screen to trace the progress of the program. But imagine you're trying to debug a PHP script that produces an image, Flash file, PDF or some other multimedia; dumping to the screen will break the content that the script is trying to produce!

This tutorial provides a solution that uses sockets to connect to a port on our  machine or another machine, and write debug information out to that. This way we can have the output of our script displayed correctly or incorrectly as the case may be in our web browser, and the information about the variables in the script sent as output somewhere else.

Code is provided for Windows, Mac OS9, OSX, Linux and the RealBasic source.

$2.89
- OR -

Allan Kent

Allan KentAllan comes from Cape Town, South Africa. He has been implicated in writing for several WROX, glasshaus, Wiley and Apress publications, generally in the 'cool stuff that PHP can do' sections.

You can catch up with him at his website http://www.mediafrenzy.co.za.

See All Postings From Allan Kent >>