cancel
Showing results for 
Search instead for 
Did you mean: 

Temporary Fix - Help needed! :)

N/A

Temporary Fix - Help needed! :)

Hello people,

Right, my site uses sessions and i have a perfectly working local version of the site and everything is hunky-dorey.... BUT f9's servers run an older version and it's not so happy anymore.

So, basically i need a bit of help with the php to find a temporary solution to the problem.

Facts:
a) It creates the session.
b) I dont believe that it records any data to the sesssion as the file sizes stay at 0 bytes.

I'm *trying* to write to the session thus:
eg:
$_SESSION['UserName'] = $UserName;

This works fine on my pc, so i assumed it would work here... but no... i dont reckon it does....

Also, when retrieving the info from the session....
echo "<P>UserName: " . $_SESSION['UserName'] . "</P>";

This returns nothing (but if it doesnt write anything to the session file what do i expect eh?!)

Any help is appreciated!

Liam
3 REPLIES
N/A

RE: Temporary Fix - Help needed! :)

Older versions of PHP used:

$HTTP_SESSION_VARS['varname']

to access session variables, not sure offhand what version F9 is running, although it's been mentioned in another thread. Anyway have a look in section "XCII. Session handling functions" of the PHP manual for more information
N/A

RE: Temporary Fix - Help needed! :)


Cheers, but i'm afraid i couldnt get it to work.... i think i'll just wait till f9 have got off their arses and upgrade.... i may be waiting a while....
N/A

RE: Temporary Fix - Help needed! :)

>
> Cheers, but i'm afraid i couldnt get it to work.... i think i'll just wait till f9 have got off their arses and upgrade.... i may be waiting a while....

I am using sessions on the f9 crofters server at the moment. try this:

session_start();
session_id($sesh_id); <--Passed as a QueryString, the fist instance can be get from session_id();

$localselectedstyle = $selectedstyle;
session_unregister("selectedstyle"); <--removed the variable from the session.
session_register("selectedstyle"); <--registers it again.

You don't have to unregister it and register it again, you can just reference against it once you have started the session and specified the ID.

I hope this helps.

Cheers
(This relys on REGISTER_GLOBALS being turned on, and on the crofters server it is)

again, I hope helps,

Cheers
Chris.