php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44563 UTF-8 Session_start()
Submitted: 2008-03-29 05:34 UTC Modified: 2008-03-29 17:47 UTC
From: quick dot webmaster at gmail dot com Assigned:
Status: Not a bug Package: *Unicode Issues
PHP Version: 5.2.5 OS: Linux
Private report: No CVE-ID: None
 [2008-03-29 05:34 UTC] quick dot webmaster at gmail dot com
Description:
------------
If file A or file B has UTF-8 encoding then you will get the error:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at index.php:1) in session.php on line 3

Using UTF-8 encoding WITHOUT BOM (Byte Order Mark) seems to fix the problem.

Reproduce code:
---------------
File A:

<?php

include("session");

?>

File B:

<?php

session_start();

?>

Expected result:
----------------
Session is created.

Actual result:
--------------
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at index.php:1) in session.php on line 3

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-29 17:47 UTC] jani@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC