473,322 Members | 1,403 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,322 software developers and data experts.

Cannot send session cache limiter - headers already sent

1
Hello,

I know that you guys are familiar with this, but I tried almost every solution I googled, but no chance getting it wroked, here is the error.


Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/admin/public_html/xxx/xxx/userclass.php:62) in /home/admin/public_html/xxx/xxx/sessiondata.php on line 28

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/admin/public_html/xxx/xxx/userclass.php:62) in /home/admin/public_html/xxx/xxx/sessiondata.php on line 28

and here is the sessiondata.php lines, that have the error.
Expand|Select|Wrap|Line Numbers
  1. if ($sessionFileDir != "") {
  2.   session_save_path($sessionFileDir);
  3. }
  4.  
  5. if ($SID == "") {
  6. session_start();
  7.   $SID = session_id();
  8. } else {
  9.   session_start($SID);
  10. }
  11.  
Hope I can get any help soon.
Dec 8 '07 #1
1 1397
Atli
5,058 Expert 4TB
Hi. Welcome to TSDN!

You get this error when you try to start a session after something has been printed (or echoed) to the response.

The session_start function must be called first, before anything is added to the response. Once you start adding to the response the headers are locked, and the session can not be started.

If you can in no way modify your design so the session_start function gets called first, then check out the Output Control functions.
Dec 9 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: mr_burns | last post by:
Hi, i am getting the following errors when running my php script: Warning: Cannot send session cookie - headers already sent by (output started at ...
3
by: lawrence k | last post by:
I'm getting this warning: PHP Warning: session_start(): Cannot send session cache limiter - headers already sent in...
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...
1
by: juergen | last post by:
Hi, there are many postings on this subject, I have read them put don't have an answer. I get these warnings: Cannot send session cookie - headers already sent in, but my php-scripts are okay. ...
14
by: bb nicole | last post by:
I using session when creaate a forum. But it display error like: Warning: session_start(): Cannot send session cookie - headers already sent by (output started at...
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,...
4
by: arashi | last post by:
I get this msg: Warning: session_start() : Cannot send session cache limiter - headers already sent (output started at /web/www/frac/users/s/students/katalog/brukere/login.php:2) in...
3
by: mrosado | last post by:
Hi everybody, I have this problem.- The browser launch this two errors: Warning: session_start() : Cannot send session cache limiter - headers already sent (output started at...
11
by: craigtomo | last post by:
i have changed my login .php file to the following this file is opened directly and is not called from any other file <?php // dBase file $host=""; // Host name $username=""; // Mysql...
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...
1
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.