php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38032 session_start() warning inspite of using ob_start()
Submitted: 2006-07-07 12:14 UTC Modified: 2006-07-15 01:00 UTC
Votes:3
Avg. Score:3.7 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (100.0%)
From: tamagog02000 at yahoo dot com Assigned:
Status: No Feedback Package: Session related
PHP Version: 4.4.2 OS: xp
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tamagog02000 at yahoo dot com
New email:
PHP Version: OS:

 

 [2006-07-07 12:14 UTC] tamagog02000 at yahoo dot com
Description:
------------
hi my problem is when am using session_start() i get this error Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\Program Files\xampp\htdocs\Copy of finalproject\signin.php:2) in C:\Program Files\xampp\htdocs\Copy of finalproject\signin.php on line 4

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\Program Files\xampp\htdocs\Copy of finalproject\signin.php:2) in C:\Program Files\xampp\htdocs\Copy of finalproject\signin.php on line 4
1 
inspite that am using ob_start() befor session_start() what should i do? here i wanna let username and id be seen by any page in website?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-07 12:16 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.


 [2006-07-07 12:28 UTC] tamagog02000 at yahoo dot com
ob_start();
session_start();
require("connect.php");
 $username=$_POST['user'];
$password=$_POST['pass'];
$sql=" select * from member where username='$username' and password ='$password'";
$result=mysql_query($sql) or die('query failed:'.mysql_error());
 $line=(mysql_fetch_array($result,MYSQL_ASSOC));
 $user=$line['username'];
 $pass=$line['password'];
 $lname=$line['lname'];
 $id=$line['mem_id'];
$_SESSION[0]=$user;
 [2006-07-07 12:33 UTC] tony2001@php.net
Please provide SHORT and COMPLETE reproduce script which we can copy/paste and reproduce the problem.
I'm sure you don't need any databases to reproduce it, do you?
 [2006-07-15 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 09:01:28 2024 UTC