Jump to content

Session var works in windows not in Linux


nert

Recommended Posts

Hi,

I'd appreciate it if any of you could help or have seen this problem before becuase its causing me pain:

I've got a simple session variable to log a username, nothing new in that I know, and all the code works fine under APACHE windows but not on APACHE Linux (Fedora 5)

Basically, it looks like the session variable is not being set and therefore I can't pull the value out of it on a subsequent page.
register_globals is off under both systens and best practice dicates it shouldn't be on anyway.

Is there a switch I need to flick in one of the .ini or config files?

Code for setting up:

[code]
session_start();
session_unset;
session_destroy();
session_start();
session_regenerate_id();
.
.
session_register("PHPSESSID");
$_SESSION['PHPSESSID'] = SESSION_ID();
session_write_close();
[/code]

code for recovering data. this always comes out as Not set.

[code]
if (!isset($_SESSION['PHPSESSID']))
{
// show warnings
}
[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.