I had to break my too complex project, about 100files, to small files. A problem is that it is still hard to see the logic, getting nice heap of session errors:
`Cannot send session cookie - headers already sent by`
How do you manage your session commands, such as “session-start” and “ob-end-flush”? Do you add them to the beginning and end of your index.php or have some centralised file to manage them?
Please, have one thumb-rule per answer.
This might not be what you are asking for, but just as a little hint:
I always leave the
<?phptag open like this:That way you can’t have any line breaks(unintended output before the session started) after the
?>which would be very hard to trace down.This convention is also used by the Zend Framework.