|
|
|
|
![]() ![]() |
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 If you need it: Gamer Online then click on the Reviews link |
|
|
|
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. |
|
|
|
| ivanc081 |
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.
|
|
|
|
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
|
|
|
|
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.
|
|
|
|
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. |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 12th October 2008 - 02:21 PM |