Sometimes I have problems in which a PHP file, somewhere on a large system, generates false output in certain situations.
This may be due to the fact that someone accidentally typed a space or other character in front of the opening tag <?phpor left unwanted debugging echoin place or included some spaces after the last closing tag ?>.
Is there a way to generate a log that shows all the PHP files that generated some output, along with their output?
If not, is there any other way that can be suggested to track this issue?
Edit: clarify - the system I'm running on is Moodle (not directly related to the case, but as it was asked ...), and in this case the output was during the database update (but I had a similar problem with random characters are displayed at another time). There are a very large number of different PHP scripts loaded into memory to create the page, so manually determining what generates the unwanted output was not a very attractive prospect ...
source
share