Page 1 of 1

Problem with Apache & sessions

Posted: Wed Feb 05, 2003 11:19 am
by Czar
While ago i changed my server from Xitami to Apache and reinstalled PHP. What i had, was a happy goodworking system and what i have now, is a bunch of problems... For example, the most annoying problem is; Sessions are not working properly. I cant register a variable into a session, not with $_SESSION["var"] = "something"; and neither with session_register("var");. When i try to check if a variable is set and if it is correct like if (isset("var") && ("var" == "something")) { print "something"; } i get nothing. Why? I have tried to configure php.ini and httpd.conf, session savepath is set.

I would appreciate any help.

Posted: Wed Feb 05, 2003 1:46 pm
by kcomer
You are assuming register_globals are on, by default they are off though. Take a look at this page. http://us.php.net/manual/en/security.re ... lobals.php

I'm guesing you just need to always use $_SESSION['var'] and it will work

Keith