473,320 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

session_start error.

I had installed php 4.3.7 on my system and test some php code.
But there is a serious problem. On my system(using apache2) the code,

<?php
session_start();
?>

gets some warning,

Warning: session_start(): read returned less bytes than requested in
/home/http/index.html on line 2

Warning: session_start(): Cannot send session cookie - headers already
sent by (output started at /home/http/index.html:2) in
/home/http/index.html on line 2

Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at /home/http/index.html:2) in
/home/http/index.html on line 2

Whant is the solution of this problem? Please me. :=(
Jul 17 '05 #1
4 3281
On Mon, 28 Jun 2004 20:07:16 -0700, K. Choi wrote:

Warning: session_start(): read returned less bytes than requested in
/home/http/index.html on line 2

Warning: session_start(): Cannot send session cookie - headers already
sent by (output started at /home/http/index.html:2) in
/home/http/index.html on line 2

Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at /home/http/index.html:2) in
/home/http/index.html on line 2

Whant is the solution of this problem? Please me. :=(

Try setting register_globals to off.

--
Well-behaved women seldom make history

Jul 17 '05 #2
On 28 Jun 2004 20:07:16 -0700, ki**********@gmail.com (K. Choi) wrote:
Warning: session_start(): Cannot send session cookie - headers already
sent by (output started at /home/http/index.html:2) in
/home/http/index.html on line 2


it means that your script has produced an output in line2 at
index.html that should not be there.

session_start() must be the first command in your script, before any
output (not even a blank or new line) is sent to the browser.

Regards

Marian

--
Tipps und Tricks zu PHP, Coaching und Projektbetreuung
http://www.heddesheimer.de/coaching/
Jul 17 '05 #3
Mladen Gogala <go****@sbcglobal.net> wrote in message news:<pa****************************@sbcglobal.net >...
On Mon, 28 Jun 2004 20:07:16 -0700, K. Choi wrote:

Warning: session_start(): read returned less bytes than requested in
/home/http/index.html on line 2

Warning: session_start(): Cannot send session cookie - headers already
sent by (output started at /home/http/index.html:2) in
/home/http/index.html on line 2

Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at /home/http/index.html:2) in
/home/http/index.html on line 2

Whant is the solution of this problem? Please me. :=(

Try setting register_globals to off.


It already off. :-(
Jul 17 '05 #4
K. Choi wrote:
Mladen Gogala <go****@sbcglobal.net> wrote in message news:<pa****************************@sbcglobal.net >...
On Mon, 28 Jun 2004 20:07:16 -0700, K. Choi wrote:

Warning: session_start(): read returned less bytes than requested in
/home/http/index.html on line 2

Warning: session_start(): Cannot send session cookie - headers already
sent by (output started at /home/http/index.html:2) in
/home/http/index.html on line 2

Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at /home/http/index.html:2) in
/home/http/index.html on line 2

Whant is the solution of this problem? Please me. :=(

Try setting register_globals to off.

It already off. :-(


Make sure that there are no blank lines before session_start(), also
check that the file is saved in ANSI encoding and uploaded in ascii.

G
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Florence HENRY | last post by:
Hello, I've searched about my problem on google before posting, but I didn't find anything relevant... I have a problem with session_start. Here is my code : <html> <head> <?php...
2
by: Reply-Via-Newsgroup Thanks | last post by:
Folks, I consider myself a reasonably strong PHP programmer, but I've not used sessions before (I've used cookies instead) and I'd appreciate it if someone could confirm something for me. ...
3
by: Trogdor | last post by:
I set up a server on an AMD 650 machine running gentoo linux. I installed Apachie 2, MySQL 4.1 and PHP 4.3.11 I use another computer on my local net (192.168.0.x) to access the server as a...
8
by: lkrubner | last post by:
I was trying to set a cookie before I called session_start() and it was giving me an error. But isn't sessions really just a cookie? Why would it matter if I sent a cookie before session_start? Can...
4
by: Curious George | last post by:
I have a frameset with multiple aspx pages whithin it. I lauch the page and notice that it triggers many session_start events. In fact I knotice multiple events for the same page. I am also...
4
by: csn | last post by:
Is it possible to have a Response.Redirect in Global.asax in the Application_Start and Session_Start events? We have code in both events, with try-catch blocks, and if an exception is caught, we...
19
by: lawrence k | last post by:
How can I find out where my script is outputting to the screen for the first time? My error logs are full of stuff like this: PHP Warning: session_start(): Cannot send session cache...
2
by: IchBin | last post by:
I am getting the error message below when ever I try to start my script on two different servers. I am not getting any errors off of my PC. I have looked around and found the answer a simple one. I...
6
by: comp.lang.php | last post by:
I am using session_start() on index.php and for some reason sometimes it'll fail. No warnings, no errors, no notices, not even after prepending error_reporting(E_ALL) and ini_set('display_errors',...
4
by: three-eight-hotel | last post by:
I'm somewhat of a newbie to PHP coding, but have developed a site using the technology, and have been pleasantly surprised by the capabilities offered. I am more comfortable in the ASP world,...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.