php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37080 Cannot send session cookie - Cannot modify header information
Submitted: 2006-04-14 09:13 UTC Modified: 2006-04-14 09:42 UTC
From: hodukibi at yahoo dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.4.2 OS: Linux
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: hodukibi at yahoo dot com
New email:
PHP Version: OS:

 

 [2006-04-14 09:13 UTC] hodukibi at yahoo dot com
Description:
------------
I just test file login.php but when I submit it show errors session_start(): Cannot send session cookie and cannot modify header information - headers already sent by ... I don't use echo or print anything before 

Reproduce code:
---------------
<body>

<?
$login = $_POST["login"];
if ($login==1) {
	session_start();
	$admin = "abc";
	session_register("admin");
	header("Location: admin.php");
}
?>

<form name="frmLogWP_User" method="post" action="login.php">
<input type="submit">
<input type=hidden name="login" value="1">
</form>

</body>

Expected result:
----------------
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home2/glass/avsstouristservices-www/tiepthivn/wcms/aaa.php:8) in /home2/glass/avsstouristservices-www/tiepthivn/wcms/aaa.php on line 11

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home2/glass/avsstouristservices-www/tiepthivn/wcms/aaa.php:8) in /home2/glass/avsstouristservices-www/tiepthivn/wcms/aaa.php on line 11

Warning: Cannot modify header information - headers already sent by (output started at /home2/glass/avsstouristservices-www/tiepthivn/wcms/aaa.php:8) in /home2/glass/avsstouristservices-www/tiepthivn/wcms/aaa.php on line 14



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-14 09:42 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.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


"output started at /home2/glass/avsstouristservices-www/tiepthivn/wcms/aaa.php:8"
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 17:00:02 2026 UTC