ID:               16389
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Feedback
+Status:           Open
 Bug Type:         Session related
 Operating System: Linux
 PHP Version:      4.1.2
 New Comment:

try this, but try across subdomains.
.htaccess for sub1

php_value session.name eisessid
php_value session.auto_start 1
php_value session.save_path /home/blah/tmp
php_value session.cookie_domain .blah.com

now make a script and add a session variable... just register
anything...

now make a replica of this .htaccess for sub2 but remove session.name
directive.

now in sub2 try to access the session variable of sub1 you wont be able
to. add the session_name into your script (not .htaccess) and try
again.. and ofcourse the session_id.. yet wont work

now in .htaccess add the session.name directive and set it to
blahsessid and in the sub2 page, set session_name to eisessid so u can
access sub1's sessvar. you should be able to do it now. even if u
change .htaccess to eisessid it will work

this shows u can access the session variable of another sub only if
there is a directive for session.name in .htaccess even tho the session
name is different. but otherwise without this directive it just wont
work.


Previous Comments:
------------------------------------------------------------------------

[2002-04-02 08:30:50] [EMAIL PROTECTED]

Could you paste short and complete script?

------------------------------------------------------------------------

[2002-04-02 06:34:29] [EMAIL PROTECTED]

Okay i was playing around some more..
I found that if i set some other session name into .htaccess i can yet
retrieve information from my actual session variable (eisessid). but if
i dont add anything into .htaccess (default being phpsessid) it doesnt
seem to work.

------------------------------------------------------------------------

[2002-04-02 06:19:31] [EMAIL PROTECTED]

i almost forgot session_name also returns eisessid if i set it from my
script but doesnt return any session variable info. But using .htaccess
it yet returns eisessid as session name but this time it returns the
session variable info as well. (both cases session_id remains the
same).

------------------------------------------------------------------------

[2002-04-02 05:57:17] [EMAIL PROTECTED]

session_name is supposed to get/set the session name.
So basically if i have a session variable which is registered under a
particular session name and a session id i should be able to propogate
it across any subdomain.

Now heres the real problem
i have a domain.com which works on eisessid as its session name and i
have abc.domain.com which i am trying to access the session
information.

When i set session_name to eisessid i do not get the information of
that session(from within my php script). However, when i put
session.name as eisessvar in my .htaccess of abc.domain.com i am able
to retrieve the information.

Since session_name is supposed to set/get the name of the session and i
am propogating the session id to work, shouldnt session_name from
within my code be able to access the session variables ? instead of
having to only do it from .htaccess ?


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=16389&edit=1

Reply via email to