#30893 [NEW]: session_register():
From: nimishthomas at yahoo dot com
Operating system: win XP
PHP version: 4.3.9
PHP Bug Type: *General Issues
Bug description: session_register():
Description:
------------
ERROR:
Warning: session_register(): Cannot send session cookie - headers already
sent by (output started at c:\web\s1.php:2) in c:\web\s1.php on line 6
iT IS RELATED TO Session.
Reproduce code:
---------------
<?php
if (!session_is_registered('count')) {
session_register('count');
$count = 1;
}
else {
$count++;
}
?>
Hello visitor, you have seen this page <?php echo $count; ?> times.<p>;
<?php
echo SID
?>
To continue, <A HREF="nextpage.php?<?php echo SID?>">click here</A>
Expected result:
----------------
donot show the warning.
Actual result:
--------------
I got the session id . but warning is shown.
--
Edit bug report at http://bugs.php.net/?id=30893&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30893&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30893&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30893&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30893&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30893&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30893&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30893&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30893&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30893&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30893&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30893&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30893&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30893&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30893&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30893&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30893&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30893&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30893&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30893&r=mysqlcfg
Thread (2 messages)
- nimishthomas at yahoo dot com