Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Session Start() Problem, Need help with an error
HmmZ
post Mar 25 2005, 08:58 PM
Post #1


Super Member
*********

Group: Members
Posts: 362
Joined: 2-March 05
From: The Netherlands
Member No.: 4,097



Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/ridouan/public_html/Reviews.php:5) in /home/ridouan/public_html/Reviews.php on line 6

Can't seem to fix the error (im a php noob)
So i'd appreciate some help smile.gif

If you need it:
Gamer Online then click on the Reviews link
Go to the top of the page
 
+Quote Post
mobious
post Mar 26 2005, 03:47 AM
Post #2


Advanced Member
*******

Group: Members
Posts: 113
Joined: 14-January 05
From: Philippines
Member No.: 3,271



session_start() MUST be always on the very top of each script. before any ouput is sent to the output buffer.

also php warnings and notices etc. sometime gives output without you knowing it. try setting the error_reporting to none.
Go to the top of the page
 
+Quote Post
ivanc081
post Mar 26 2005, 10:17 AM
Post #3





Guests






I wrote session tutorial. U can read it on this link . It show U the basics of sessions, and will be usefull 4 U.
Go to the top of the page
 
+Quote Post
HmmZ
post Mar 26 2005, 04:06 PM
Post #4


Super Member
*********

Group: Members
Posts: 362
Joined: 2-March 05
From: The Netherlands
Member No.: 4,097



Yay, it fixed it, thanks guys smile.gif
Go to the top of the page
 
+Quote Post
Mike
post Mar 26 2005, 10:24 PM
Post #5


Owner of Sub-Zero
********

Group: Members
Posts: 159
Joined: 17-November 04
Member No.: 2,325



Yes, if you use sessions, session_start() must be on the top of each page; before the <html> tag even! For cookies, it would be setcookie('COOKIENAME', COOKIEVALUE, COOKIELIFETIME'). I think that it is because when you post <html><head> it sends an automatic cookie from the site you are on.
Go to the top of the page
 
+Quote Post
mobious
post Mar 27 2005, 06:52 AM
Post #6


Advanced Member
*******

Group: Members
Posts: 113
Joined: 14-January 05
From: Philippines
Member No.: 3,271



QUOTE(Mike @ Mar 27 2005, 06:24 AM)
Yes, if you use sessions, session_start() must be on the top of each page; before the <html> tag even!  For cookies, it would be setcookie('COOKIENAME', COOKIEVALUE, COOKIELIFETIME').  I think that it is because when you post <html><head> it sends an automatic cookie from the site you are on.
*



not really. it happens because when you start to print out html tags, it is already sent to the browser. it is a rule that you can only change html header if there are no output yet sent to the browser.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Did You Face Problem Opening Pdf With Firefox?(15)
  2. Who Wants To Start A Mmorpg?(13)
  3. ---> Ftp Error Codes What They Mean <---(5)
  4. Computer Does Not Start(20)
  5. Nuclear War Scenarios(26)
  6. Upload Component - Failed(6)
  7. Connection Error 800a0e7a On Win Server 2003 X64(1)
  8. Remote Assistance Problem(9)
  9. Laptop Keyboard Problem(8)
  10. How To Start An Online Business(25)
  11. Pop-up Virus / Trojan Problem(10)
  12. How To Start With Seo(4)
  13. Firefox 3 Cookies Problem(4)
  14. Hosting Credits Problem? [resolved](9)
  15. How Did You Start Learning Php?(5)
  1. Counter Strike Problem(2)
  2. Problem With The Trap17 Forum(4)
  3. Attachment Problem In Pmwiki(0)
  4. Flex, I Need Some Info And Help(6)
  5. An XSL Transform Error(2)
  6. Linux/ Apache /mod_rewrite Issue(4)
  7. What Is My (power) Problem?(4)
  8. Problem With Hosting(4)
  9. Flex Error #1034: Type Coercion Failed: Cannot Convert Mx.managers(1)
  10. Error Installing Template In Joomla! 1.5.7(0)
  11. Problem Concerning Credits Reduced(12)
  12. Problem With My Pc(2)
  13. Billing Problem. Plz Help(2)


 



- Lo-Fi Version Time is now: 12th October 2008 - 02:21 PM