php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30893 session_register():
Submitted: 2004-11-25 09:55 UTC Modified: 2005-01-26 05:08 UTC
From: nimishthomas at yahoo dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.9 OS: win XP
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nimishthomas at yahoo dot com
New email:
PHP Version: OS:

 

 [2004-11-25 09:55 UTC] nimishthomas at yahoo dot com
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-25 11:19 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Please, ask support questions in appropriate maillist: http://www.php.net/support.php.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 19:00:01 2026 UTC