Please note: CPAINT nor this website is under active development. |
Debugging
Starting with the release of CPAINT v2.0.2, a backend debugging utility has been included in the CPAINT distribution archive. For previous releases of CPAINT, the debugger included in v2.0.2 will work with previous v2.x releases.
This debugger generates a basic interface for all backend functions (including those not registered with the CPAINT class). While the debugger will co-exist with "live" scripts, we suggest that you remove the debugger when you launch the backend logic on a "live" server that will be used by external users.
To use the debugger, simply include the "cpaint2.backend-debugger.php" file in the script containing your backend code after you include the main CPAINT backend classes.
Example:
include("cpaint2.inc.php");
include("cpaint2.backend-debugger.php");
Then, simply call the backend script directly and you should see the debug interface . (If the debugger isn't included, you would normally get the error "A function name was passed that is not allowed to execute on this server.") Here is a live example.
Note: In Internet Explorer, if you use the response type 'TEXT', sometimes the browser will attempt to download the file as a text file, rather than viewing it in the IFRAME.