Forum Moderators: coopster
This works ok. However to ensure stability and reliability, I am concerned about error handling. If something goes wrong in the php, how are errors reported? Just with a red cross in lieu of the image? From my tests, it appears so, and the php error handler does not catch any error, or at least does not generate any sort of error message in the browser.
I've not had any luck with searches on that matter so far. Has anyone some light to shed on this or similar experience to share? Thank you.
Cheers,
Cook
You'd want to use a different kind of error handling with the image-producing file. You can use:
ini_set('log_errors', 1);
This will log php errors in the server's error log; or else you can use set_error_handler() and set a function that you write to make a log entry.
You can also use gd to print out error messages on the image itself; I've done this one too, and it's good for logical errors in the image-production script (only works if a valid image is actually produced). image_string() is what you'd be looking for, probably in some kind of combo with set_error_handler().