473,566 Members | 2,784 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3288
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_global s to off.

--
Well-behaved women seldom make history

Jul 17 '05 #2
On 28 Jun 2004 20:07:16 -0700, ki**********@gm ail.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 Projektbetreuun g
http://www.heddesheimer.de/coaching/
Jul 17 '05 #3
Mladen Gogala <go****@sbcglob al.net> wrote in message news:<pa******* *************** ******@sbcgloba l.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_global s to off.


It already off. :-(
Jul 17 '05 #4
K. Choi wrote:
Mladen Gogala <go****@sbcglob al.net> wrote in message news:<pa******* *************** ******@sbcgloba l.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_global s 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
2894
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 session_start();
2
1923
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. Namely... I'm working on someone else's code who has used sessions - In their main login page, they do not use session_start() but instead, just write...
3
2205
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 client. MySQL works perfectly. I have created and queried databases with no problem. Apachie 2 appears to work with no problem. I can call up web...
8
2226
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 I set them afterwards?
4
5906
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 using windows authentication. On a few pages I get guest and then the user who is loged into the computer. I am writing user information to my...
4
6640
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 wanted to redirect to an error page. But, this doesn't seem to work. So, another question is, if an exception is thrown and caught in a catch...
19
7909
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 limiter - headers already sent in /home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandStartSession.php on line 14
2
1837
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 can not stop the error in my script. The session_start() is the first thing that happens before any Headers are created. Any one have any...
6
1960
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', TRUE) before session_start() do I see anything, it just plain dies. I used LiveHTTPHeaders to verify that I am getting a 200 OK response, thus...
4
5926
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, however and am really struggling with managing sessions in PHP, based on my experiences with managing sessions in ASP. 99.9% of the feedback I have...
0
7584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8108
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7644
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6260
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
2083
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1201
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.