From: michel at ziobudda dot net Operating system: Linux Redhat 8.0 PHP version: 5CVS-2003-06-27 (dev) PHP Bug Type: Session related Bug description: Double warning
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 -- Edit bug report at http://bugs.php.net/?id=24356&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24356&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24356&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24356&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24356&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24356&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24356&r=support Expected behavior: http://bugs.php.net/fix.php?id=24356&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24356&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24356&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24356&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24356&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24356&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24356&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24356&r=gnused