php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24356 Double warning
Submitted: 2003-06-27 04:58 UTC Modified: 2003-06-27 05:03 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: michel at ziobudda dot net Assigned:
Status: Not a bug Package: Session related
PHP Version: 5CVS-2003-06-27 (dev) OS: Linux Redhat 8.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: michel at ziobudda dot net
New email:
PHP Version: OS:

 

 [2003-06-27 04:58 UTC] michel at ziobudda dot net
Description:
------------
This little script 

      1
      2 <?php
      3 session_start();
      4 ?>
      5 session inizializzata

must to be produce a warning (line 1 is empty so something is send to header). But there is a problem: there are 2 warning:

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/httpd/html/LIBRO/sessioni/1.php:2) in /home/httpd/html/LIBRO/sessioni/1.php on line 3

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/httpd/html/LIBRO/sessioni/1.php:2) in /home/httpd/html/LIBRO/sessioni/1.php on line 3
session inizializzata


I have no php.ini set, so there is the default.

Some value from phpinfo():

display_errors => On => On
display_startup_errors => Off => Off
error_append_string => no value => no value
error_log => no value => no value
error_prepend_string => no value => no value
error_reporting => no value => no value
html_errors => Off => On
ignore_repeated_errors => Off => Off
log_errors => Off => Off
log_errors_max_len => 1024 => 1024
track_errors => Off => Off

session.auto_start => Off => Off
session.cookie_domain => no value => no value
session.cookie_lifetime => 0 => 0
session.cookie_path => / => /
session.cookie_secure => Off => Off

bye


Reproduce code:
---------------
      1
      2 <?php
      3 session_start();
      4 ?>
      5 session inizializzata

Expected result:
----------------
Only one warning.

Actual result:
--------------
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/httpd/html/LIBRO/sessioni/1.php:2) in /home/httpd/html/LIBRO/sessioni/1.php on line 3

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/httpd/html/LIBRO/sessioni/1.php:2) in /home/httpd/html/LIBRO/sessioni/1.php on line 3
session inizializzata

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-27 05:03 UTC] derick@php.net
This is not a bug. You should get two warnings as there are two things going wrong (like explained to you on the internals@ list). Not a bug -> bogus
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 05 10:01:33 2025 UTC