note 43957 added to function.session-start
| From: | "aleczapka_at\)gmxdotnet" at rn2 dot php dot net | Date: | Fri, 09 Jul 2004 21:54:55 +0000 |
| Subject: | note 43957 added to function.session-start | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-72945@lists.php.net to get a copy of this message | ||
For all people who struggle with IE 6 and session beeing lost, I could have another remendy.
I read lots of threads according problem with IE 6 and sessions. I had similar symptoms - every time
I refreshed the page with IE - new session file was created, so the session was not remembered.
I've tried different solutions from different people and with no luck. What even worse this bug
only appeared with English version of IE and english w2k. To spice things up this bug only appeared
with server beeing run under Linux.
This problem didn't show up with english version of IE on english w2k when using local
webserver (Apache 1.x and 2.x for Windows - I've tired both). But when I tired the scripts on
my ISP server the bug occured again.
There were no problems with german version of IE and german windows + Apache running under Linux,
only english version of IE had problems with it.
I don't know about other localized versions but this is what I've noticed.
So instead of using just session_start(), use this:
<?php
if (!session_id("mysession"))
session_start();
?>
Be aware that using a session name i.e. "mysession" in function session_id() is crucial.
This does the trick.
Without it it just doesn't work again.
My php.ini:
session.use_trans_sid = 0
session.auto_start = 0
session.use_cookies = 1
This is the fix which worked for me, maybe it can save somebody's day.
----
Manual Page -- http://www.php.net/manual/en/function.session-start.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43957
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43957&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43957&report=yes
Search -- http://master.php.net/manage/user-notes.php