Jump to content


Photo

session_start(); Problems


  • Please log in to reply
5 replies to this topic

#1 Taguan

Taguan
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 26 March 2006 - 09:21 PM

We have a site www.buitendegrenzen.be and we wrote it in PHP the inlogscript is whit a session and a cookie .

Last week we transfert to a new hosting and sinds then the inlogscript gives problems.

it gives always an error on the place where i put

session_start();

the error looks like this :

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/cybertro/public_html/buitendegrenzen/index.php:17) in /home/cybertro/public_html/buitendegrenzen/index.php on line 18

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/cybertro/public_html/buitendegrenzen/index.php:17) in /home/cybertro/public_html/buitendegrenzen/index.php on line 18


I did try manny changes but there is always an error on the place of the session start .

I hope some one can help me !

or some suggestions i can try ...

Thanks

#2 toplay

toplay
  • Staff Alumni
  • Advanced Member
  • 973 posts

Posted 26 March 2006 - 09:27 PM

This has been asked a lot on this board.

Look in the newbie section (and FAQ page).

[a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=37442\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?showtopic=37442[/a]


#3 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 26 March 2006 - 10:37 PM

just sometihnk easy to try before reding all the posts ok.

Always put session_start() at the top of a page and always never have anythink before it.
<? session_start()





?>

If that dont work then please read the above comment as advised.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 27 March 2006 - 10:45 AM

The source of the output is comming form witin index.php on or around line 17. So check index.php have a look at lines 15 to 20 in index.php if you cant see why then maby post you code here.

But please do read the thread toplay has posted.

#5 Taguan

Taguan
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 28 March 2006 - 06:28 PM

I know it has to be on the top of te page and i did put it there for trying .

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/cybertro/public_html/buitendegrenzen/index.php:1) in /home/cybertro/public_html/buitendegrenzen/index.php on line 3

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/cybertro/public_html/buitendegrenzen/index.php:1) in /home/cybertro/public_html/buitendegrenzen/index.php on line 3



and i dit try

ob_flush();
ob_start();
session_start();

nothing solved the problem

i hope somone can help me .

#6 redbullmarky

redbullmarky
  • Staff Alumni
  • Advanced Member
  • 2,863 posts
  • LocationBedfordshire, England

Posted 28 March 2006 - 07:49 PM

[!--quoteo(post=359389:date=Mar 28 2006, 07:28 PM:name=Taguan)--][div class=\'quotetop\']QUOTE(Taguan @ Mar 28 2006, 07:28 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
i hope somone can help me .
[/quote]

toplay already did.

there's not one single session/header problem that i've not (or anyone else after some careful checks) has not been able to eliminate after carefully following the advice on the link provided.

post your code above and including your 'session_start()' line
"you have to keep pissing in the wind to learn how to keep your shoes dry..."

I say old chap, that is rather amusing!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users