sessions in FF and IE

This is a discussion on sessions in FF and IE within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hello all, I use sessions to store some information which I can use in all the pages of my website. ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-22-2007
Chello
 
Posts: n/a
Default sessions in FF and IE

Hello all,

I use sessions to store some information which I can use in all the pages of
my website. This works fine in FF(1.5) but in IE (7) I have a new session in
every page? I checked my code I do a session_start() once at the top of the
pages.
Is there a setting in IE which forces to start a new session?

in IE I have enabled cookies for all sites, I disabled all browser addons.
What am I missing. Is there anybody out there who knows how to solve this?

I looks like this is not a PHP problem but maybe sombody has encountered the
same problem and has an answer for me.

thanks in advance


Reply With Quote
  #2 (permalink)  
Old 04-19-2007
pritaeas
 
Posts: n/a
Default Re: sessions in FF and IE

You should use

if (! session_id ()) session_start ();

instead of just session_start().

Regards, Hans

"Chello" <...> wrote in message
news:d27f2$46028f2b$3ea34df4$7452@news.chello.nl.. .
> Hello all,
>
> I use sessions to store some information which I can use in all the pages

of
> my website. This works fine in FF(1.5) but in IE (7) I have a new session

in
> every page? I checked my code I do a session_start() once at the top of

the
> pages.
> Is there a setting in IE which forces to start a new session?
>
> in IE I have enabled cookies for all sites, I disabled all browser addons.
> What am I missing. Is there anybody out there who knows how to solve this?
>
> I looks like this is not a PHP problem but maybe sombody has encountered

the
> same problem and has an answer for me.
>
> thanks in advance
>
>



Reply With Quote
  #3 (permalink)  
Old 04-19-2007
John Murtari
 
Posts: n/a
Default Re: sessions in FF and IE

"pritaeas" <pritaeas@hotmail.com> writes:

>> I use sessions to store some information which I can use in all the pages

> of
>> my website. This works fine in FF(1.5) but in IE (7) I have a new session

> in
>> every page? I checked my code I do a session_start() once at the top of

> the
>> pages.
>> Is there a setting in IE which forces to start a new session?
>>
>> in IE I have enabled cookies for all sites, I disabled all browser addons.
>> What am I missing. Is there anybody out there who knows how to solve this?
>>
>> I looks like this is not a PHP problem but maybe sombody has encountered

> the
>> same problem and has an answer for me.
>>
>> thanks in advance


> You should use
>
> if (! session_id ()) session_start ();
>
> instead of just session_start().
>


Not sure if you really need to check, the documentation for
session_start says it will resume a session if already present. We do
a lot of session stuff in PHP and just use session_start().

Hope this helps.
--
John
__________________________________________________ _________________
John Murtari Software Workshop Inc.
jmurtari@following domain 315.635-1968(x-211) "TheBook.Com" (TM)
http://thebook.com/
Reply With Quote
  #4 (permalink)  
Old 04-24-2007
Rik
 
Posts: n/a
Default Re: sessions in FF and IE

Chello wrote:
> Hello all,
>
> I use sessions to store some information which I can use in all the pages of
> my website. This works fine in FF(1.5) but in IE (7) I have a new session in
> every page? I checked my code I do a session_start() once at the top of the
> pages.
> Is there a setting in IE which forces to start a new session?
>
> in IE I have enabled cookies for all sites, I disabled all browser addons.
> What am I missing. Is there anybody out there who knows how to solve this?
>
> I looks like this is not a PHP problem but maybe sombody has encountered the
> same problem and has an answer for me.


I've heard about more people having this problem with MSIE 7. Haven't
yet heard the solution though. Try to determine wether MSIE accepts the
session. If you're using cookies, check wether it came back or not. If
it didn't, there's a reason MSIE rejected it. Try to play around with
the session constants (http://www.php.net/manual/en/ref.session.php)
untill it does accept it.

HTH,
--
Rik Wasmus

Estimated date being able to walk again: 01-05-2007.
Less then a week, hurray!
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:55 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0