Bug #16389 Updated: session_name doesnt work as expected

From: Date: Wed, 03 Apr 2002 14:42:07 +0000
Subject: Bug #16389 Updated: session_name doesnt work as expected
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-3916@lists.php.net to get a copy of this message
ID: 16389 Updated by: yohgaki@php.net Reported By: assid@assid.com -Status: Open +Status: Closed Bug Type: Session related Operating System: Linux PHP Version: 4.1.2 New Comment: I think other issue is fixed in 4.2.0RC1. Visit http://qa.php.net/ for 4.2.0RC1. Please reopen if you still have problem. Thank you. Previous Comments: ------------------------------------------------------------------------ [2002-04-03 09:03:13] yohgaki@php.net You are starting session automatically. Then you cannot change session name with session_name(). (I've commited warning patch before but it's reverted) PHP does not raise any error and it does work. It's not nice. Don't you think so ;) BTW, when we ask script, paste script even if it _very_ simple. There are many cases that no one cannot be sure if it's bug or user error w/o script. It seems there is other issue in your report also. ------------------------------------------------------------------------ [2002-04-03 06:31:29] assid@assid.com 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. ------------------------------------------------------------------------ [2002-04-02 08:30:50] yohgaki@php.net Could you paste short and complete script? ------------------------------------------------------------------------ [2002-04-02 06:34:29] assid@assid.com 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] assid@assid.com 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). ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/16389 -- Edit this bug report at http://bugs.php.net/?id=16389&edit=1

« previous php.bugs (#3916) next »