CodeIgniter Forums
SESSION problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: SESSION problem (/showthread.php?tid=24459)



SESSION problem - El Forum - 11-10-2009

[eluser]n3ck[/eluser]
Hi guys!

I've made a web app for some corp. and i have huge headache with one thing: everywhere this app works good except HQ of this corp. In the HQ, the auth things gets about 3 minutes and ends with timeout. I deducted, that problem may be with sessions. I've made a couple of test (auth with db, without db, only with sessions, and without sessions), and let HQ's employees to get through it. Only test without sessions seems to be passed successful. So i decided to wrote some simple test code to check what happens with sessions. This is my test code and results:

Code:
<?php session_start();
$_SESSION['blabla'] = 'aaaaa';
?>
<a href="sessiontest.php">Next</a>

sessiontest.php
Code:
&lt;?php
    session_start();
    $session = var_export($_SESSION, true);
    $file = fopen('/debug/session.log','a+');
    fwrite($file, date('H:m:s').$session."\n");
    fclose($file);
?&gt;

And results (only my own attempt):
Code:
09:11:27array (
  'blabla' => 'aaaaa',
)

Tere is no entry of HQ's employees attempts. People from HQ says, that it has been loading for few minutes with no success. Any ideas why?


SESSION problem - El Forum - 11-11-2009

[eluser]n3ck[/eluser]
I would add, that cookies are sent correctly and i can read values from cookies.


SESSION problem - El Forum - 11-13-2009

[eluser]n3ck[/eluser]
Also i would add that code like
Code:
session_start();
$_SESSION['blabla'] = 'aaaaa';
session_write_close();

works, but when i put session_start() it in start of my controller constructor and session_write_close() at the end it doesn't work. And i got known that this is not only HQ problem, and in some locations it also don't work.


Should I add session_start() as firs function in controller constructor, or it could be somewhere within constructor functions (after library loading or sth)?


SESSION problem - El Forum - 11-13-2009

[eluser]n0xie[/eluser]
What browser are you testing with? See my signature.


SESSION problem - El Forum - 11-13-2009

[eluser]n3ck[/eluser]
Firefox and IE.


SESSION problem - El Forum - 11-15-2009

[eluser]n3ck[/eluser]
Unfortunately, none of your signature tips helped to me..