I just spent a couple of hours finding a presumed bug in my beloved CMS. However, it turns out my CMS is ok. It seems that there is a bug in PHP Version 4.1.2 which will prevent you from executing large files.
When you include large files (mine was about 170k) the whole script will fail to execute. Simply reducing the size to below 170k by deleting some text from an heredoc without changing any other code will get the script to work. A much simpler (just one heredoc that is echoed) but larger file failed when it got bigger than 240k.
Running both scripts under PHP Version 4.2.3 worked without errors.
There was a question about the maximal size of arrays [webmasterworld.com] a while ago where the script failed once the array got really big. I wouldn´t be surprised if the same script would be running fine in a newer PHP version.
Comments welcome. Have you experienced similar bugs in PHP.
I just looked at the biggest include files I seem to use in my own creations are on the order of 20k. About that size I tend to split things off into separate files to make it easier for me to keep track of. Seems there's a bug in my brain that makes me handle large files poorly ;)