Problem with Apache & sessions

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Czar
Forum Commoner
Posts: 58
Joined: Sun Dec 29, 2002 11:17 am

Problem with Apache & sessions

Post 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.
kcomer
Forum Contributor
Posts: 108
Joined: Tue Aug 27, 2002 8:50 am

Post 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
Post Reply