Ticket #1484971 (closed Feature Requests: fixed)
Tip to adjust php code ending to stop headers already send errors
| Reported by: | BudgetDedicated | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.2-alpha |
| Component: | Client Scripts | Version: | 0.1.1 |
| Severity: | minor | Keywords: | php headers ob |
| Cc: |
Description
For me there was still an error in with headers already send. As it turned out there was an extra white line trailing my database config file. Small mistakes like that mess up a lot even downloading attachments etc does not work.
To solve this I suggest two things:
1) call ob_start in the first call of index.php to stop output from going anywhere untill the application is sure that the right headers are selected and queued.
2) I suggest that you remove all '?>' endings from php files including the config files. This way an extra white line will just belong to the php code and no problems will be caused by it. There is no reason to include this ending unless you are planning to append code that must not be parsed by php.
