in reply to Tired of session/cookie problem

Powerman's post is very big and maybe a little unlear. So I try to formulate why we begin to use this sessions and advantages of it (and a bit about realization):

Several start points :

1) Session should work lazy way. Is it possible - magically both for programmer and designer.

2) Should allow work to an user in several windows with different session id (e.g. Admin open several wraped Member's control centers).

Why not to use cookie ?

Main reason - many users disabled in IE cookie. Even session ones

And several minor reasons - for example, this will be impossible (ok. possible, but VERY UGLY and difficult) open several different sessions in one browser simul.

So we choose to store session in PATH. in form like www.host.com/session_id/some_path/my.cgi

This allow to save session_id between user requests in user URL and allow to magically save session_id in relative hyperlinks. (e.g. link like href="../other_path/own.cgi")

Ok. Next question - how to deal with this at Apache side ?

Straitforward solutuion - use mod_rewrite. Unfortunately soem web hostings don't allow to use mod_rewrite.

Next solution looks like very elegant. And we don't meet it before. I mean use symlinks as it describe Powerman. (for example our directory is /www/somehost.com/htdocs/. so /www.somehost.com/htdocs/-/12/34/56/78/90/-/ will lead to /www/somehost.com/htdocs/ again.)

Thats all about the idea. Now several words about realization :

We store users data in Session table (MySQL). in .cgi

%S = load_session();

calls made.

This call

1) read session info from $ENV{REQUEST_URI}

2) execute new_session() if needed

3) return Session data as hash.