PHP 4.0 Bug #8974: Blank lines in includes cause session errors
| From: | samj at faredge dot com dot au | Date: | Mon, 29 Jan 2001 05:42:42 +0000 |
| Subject: | PHP 4.0 Bug #8974: Blank lines in includes cause session errors | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-45194@lists.php.net to get a copy of this message | ||
From: samj@faredge.com.au
Operating system: All
PHP version: 4.0.4pl1
PHP Bug Type: Feature/Change Request
Bug description: Blank lines in includes cause session errors
A PHP script with includes followed by commands which set headers (ie session_start) will generate
errors if include file(s) contain blank lines. For example:
<?
include "includes/functions.inc";
session_start();
?>
where functions.inc contains leading or trailing blank lines will result in an error like:
Warning: Cannot send session cache limiter - headers already sent
This problem appears to be very common (according to a search on google), and has no doubt
frustrated many PHP users.
Unfortunately this behaviour is technically 'correct', although it should probably be
fixed anyway.
--
Edit Bug report at: http://bugs.php.net/?id=8974&edit=1