PHP development

PHP development

From TeleFlow

Jump to: navigation, search

PHP is used as the primary web development and coding environment for all applications that operate with TeleFlow solutions available on this website. Occasionally something happens that just needs to be mentioned and hopefully found for the benefit of all developers.

Installation and Error Resolution

Headers already sent

Recently, this error started occurring when we installed a PHP application on a different computer:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\TFVO\reports.php:1) in C:\TFVO\reports.php on line 22

Initially, it appeared that this was due to whitespace occurring before the <head> of the html document. After hours of futile efforts looking for whitespace (it wasn't there) and then at setting the buffering on in the web server (to no effect), we finally found this:

utf-8 when sending 'bom', includes 3 invisible characters before script starts.

These three invisible characters constituted the whitespace. Change coding or use coding utf-8 without 'bom' in order to prevent that error message. If you are using Notepad++, do this in Settings > Preferences > New document