cvs: /php4/ext/session session.c

From: Date: Wed, 29 Mar 2000 09:36:57 +0000
Subject: cvs: /php4/ext/session session.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-12788@lists.php.net to get a copy of this message
thies Wed Mar 29 01:36:57 2000 EDT Modified files: /php4/ext/session session.c Log: @- session_start() is now more verbose if headers cannot be send. (Thies) Index: php4/ext/session/session.c diff -u php4/ext/session/session.c:1.120 php4/ext/session/session.c:1.121 --- php4/ext/session/session.c:1.120 Mon Mar 27 14:40:49 2000 +++ php4/ext/session/session.c Wed Mar 29 01:36:27 2000 @@ -36,6 +36,7 @@ #include "ext/standard/datetime.h" #include "ext/standard/php_lcg.h" #include "ext/standard/url_scanner.h" +#include "ext/standard/php_output.h" #include "ext/standard/php_rand.h" /* for RAND_MAX */ #ifdef ZTS @@ -554,7 +555,15 @@ SLS_FETCH(); if (SG(headers_sent)) { - php_error(E_WARNING, "Cannot send session cache limiter - headers already sent"); + char *output_start_filename = php_get_output_start_filename(); + int output_start_lineno = php_get_output_start_lineno(); + + if (output_start_filename) { + php_error(E_WARNING, "Cannot send session cache limiter - headers already sent by (output started at %s:%d)", + output_start_filename, output_start_lineno); + } else { + php_error(E_WARNING, "Cannot send session cache limiter - headers already sent"); + } return; } @@ -581,7 +590,15 @@ SLS_FETCH(); if (SG(headers_sent)) { - php_error(E_WARNING, "Cannot send session cookie - headers already sent"); + char *output_start_filename = php_get_output_start_filename(); + int output_start_lineno = php_get_output_start_lineno(); + + if (output_start_filename) { + php_error(E_WARNING, "Cannot send session cookie - headers already sent by (output started at %s:%d)", + output_start_filename, output_start_lineno); + } else { + php_error(E_WARNING, "Cannot send session cookie - headers already sent"); + } return; }

« previous php.version4 (#12788) next »