If Jeremy Morgan's solution doesn't work, try creating your own log file using set_error_handler()
. Usually some information about the state of the application ($GLOBALS and so on) can be enough information, but PHP will (at least try to) pass you all sorts of information about where the error occurred and what type of error it is.
Also, try using the "Divide And Conquer" method of debugging. Start with about half of your file, and then expand upward if it's still crashing or downward if it runs umtil that point. If you don't want to remove your code, either /* comment out */
the code to be cut, or use the __halt_compiler()
special directive to have PHP ignore all remaining data in the file.
Finally, one thing that drove me mad trying to fix it is what's called a Byte Order Mark. PHP was evaluating that BOM at the beginning of the file, causing it to send output, and causing problems while trying to send headers and the like. Probably not what your issue is, but knowledge worth having.