|
|
|
|
![]() ![]() |
![]() Group: Members
Posts: 21 Joined: 30-August 06 Member No.: 29,148 |
Post
#1
Aug 31 2006, 10:43 AM
after you have uploaded your site to a web server, sometimes you will find a strange message in your site when you open it: - Warning: session_start(): Cannot send session cookie - headers already sent by (output started at ............... - Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at ........... - Warning: Cannot modify header information - headers already sent by (output started at........................... I tried to analyse what false that happened in that script, here are the result : >> all things that happen above caused by 1.there are blank lines in the end of your script after "?php>" code. better if you try to upload with ASCII mode for pages. 2.The PHP function such as headers(), used with start_session(), produces HTML headers. When the PHP fragments are placed in the body of the HTML, this causes errors because the PHP fragments are trying to put HTML headers within the HTML body. Put the PHP fragments before the HTML body tag. I hope this is useful for you which has same problem with me before. |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members
Posts: 398 Joined: 9-June 06 From: Wisconsin Member No.: 24,924 |
Post
#2
Sep 1 2006, 02:05 AM
Thanks for posting this, last year I had such a hard time figuring it out! It was horrible, it took me about 2 days to figure out I had a blank line on the top of my script.
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Post
#3
Sep 1 2006, 03:17 AM
Well actually if u wnat to use sessions on your site it must be called before anything and after <?php . Then you may do whatever you want to do with headers. session_start() must be called first in any circumstance or the ERRORS. |
![]() ![]() |
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
11 | andyy15 | 659 | 4th December 2008 - 02:39 PM Last post by: onscreen |
|||
![]() |
13 | Zenchi | 812 | 26th September 2004 - 02:07 PM Last post by: BoSZ |
|||
![]() |
9 | nicky1 | 661 | 4th December 2004 - 06:47 PM Last post by: ljiljana |
|||
![]() |
19 | renegade-designs | 1,987 | 3rd December 2008 - 04:32 PM Last post by: buxgoddess |
|||
![]() |
3 | Hamtaro | 419 | 22nd January 2005 - 06:08 AM Last post by: LuciferStar |
|||
![]() |
13 | NeXDesigns | 1,741 | 25th February 2005 - 08:12 PM Last post by: Dooga |
|||
![]() |
0 | Bash | 493 | 16th February 2005 - 11:09 AM Last post by: Bash |
|||
![]() |
50 | whyme | 10,318 | 3rd December 2008 - 04:09 PM Last post by: buxgoddess |
|||
![]() |
0 | NilsC | 5,360 | 19th March 2005 - 12:06 AM Last post by: NilsC |
|||
![]() |
23 | GM-University | 1,542 | 15th April 2005 - 10:42 PM Last post by: JaVe |
|||
![]() |
0 | SamiFX | 439 | 18th September 2007 - 10:17 AM Last post by: SamiFX |
|||
![]() |
17 | choetry | 3,252 | 26th October 2008 - 12:56 AM Last post by: sylent |
|||
![]() |
7 | M.A.S.T.E.R. | 1,099 | 27th April 2005 - 08:53 PM Last post by: Hurley |
|||
![]() |
12 | electriic ink | 1,321 | 8th May 2005 - 04:01 PM Last post by: Inspiron |
|||
![]() |
21 | Fun4TheMoney | 1,508 | 3rd June 2008 - 03:55 AM Last post by: undftdx |
|||
|
Open Discussion | Time is now: 10th January 2009 - 02:13 AM |