O'Reilly logo

Core PHP Programming: Using PHP to Build Dynamic Web Sites by Leon Atkinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Remote Debugging

You may enable remote debugging for all scripts by editing the configuration file php.ini, or you may use the debugger_on function, described in Chapter 8, "I/O Functions." Once enabled, PHP will attempt to connect to a remote host and port each time a script is run.

You will need a port listening program to get the debugging information. There are numerous free port listeners for Windows. I've found Port Listener by Hauke X to work well. Similar programs exist for UNIX as well.

All debugging messages are sent to the listening host, regardless of the error reporting level set in php.ini. Messages are sent in a special format

date time host(pid) type:message-data

followed by a linefeed.

The date is in the format YYYY-MM-DD

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required