Apache Session

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
njcu
Forum Newbie
Posts: 8
Joined: Wed Aug 01, 2007 11:55 am
Location: Homestead, FL

Apache Session

Post by njcu »

I've been looking around for a way to figure out how long an Apache-client session has been running but can't find any info on it and am not really sure that it can be done. Any one know of a way to do it with PHP without the use of cookies?

thanks
Last edited by njcu on Wed Aug 01, 2007 1:34 pm, edited 1 time in total.
purefan
Forum Newbie
Posts: 15
Joined: Wed Aug 01, 2007 9:35 am

Post by purefan »

Hi!

Have you checked this site out? -> http://www.serverwatch.com/tutorials/ar ... hp/3588671
sounds like what you need...
njcu
Forum Newbie
Posts: 8
Joined: Wed Aug 01, 2007 11:55 am
Location: Homestead, FL

Post by njcu »

yeah... except they don't want to use cookies :cry:

thanks in any case...
User avatar
nathanr
Forum Contributor
Posts: 200
Joined: Wed Jun 07, 2006 5:46 pm

Post by nathanr »

http is by nature stateless, you don't know that person 1 who clicked page A is also the same person who clicked page B
to figure out if it is the same person (well browser) you need a session, to get a session you need a session cookie.
if you don't have a session cookie then you need to pass the session by GET in the uri. this method has major implications, especially where seo is concerned.
they have to have cookies if they want functionality (there are other methods of doing it, but none are recommended to be honest.

tell the client it's not possible without cookies, because realistically, it's not

ps: apache can't have a session without a cookie as far as I'm aware.. the cookie gets sent in the http requests and responses to let apache know its dealing with a single person, the only way of the browser storing this info is in a session cookie, thus a cookie is needed for an apache session aswell.

(my opinion)
njcu
Forum Newbie
Posts: 8
Joined: Wed Aug 01, 2007 11:55 am
Location: Homestead, FL

Post by njcu »

ok good, at least i'm not the only who thinks they are smoking crack... thanks
Post Reply