session.cookie_domain always work good at my server
(for session shareing across subdomain)
Are you sure your setting correctly?
If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.
Register Today on DNForum IT'S FREE!I need to keep one variable when users traverse from one subdomain to the other.
I have tried rewriting part of the htaccess file to:
php_value session.cookie_domain .hostname.com
this will not work, the session variable does not pass at all.
any suggestions or other tricks that may work for this?
session.cookie_domain always work good at my server
(for session shareing across subdomain)
Are you sure your setting correctly?
Maybe if you provide more information about how your doing this ?
One easy thing you can do if session won\'t work is passing the PHPSESSID string by GET to the subdomain, then you will not loose the session.
www.movil.be Martin
i have two subdomains. One gets a post variable from outside the site (ads), when a user comes to my page, and enters in any information the variable is stored in the DB with the information they enter. Problem is that this variable is lost when they go to the other subdomain., because they are technically different servers.
I was hoping to see if there was a way to do transfer this variable across.
GET variables are not an option, because I do not want my users to know that we are tracking this information.
I didn\'t know you were storing sessions between different servers. In php sessions are stored on static files, there is no chance the other server will read this, unless it has access to the same session storage.
Basically I would recommend to send this encrypted, and decrypt in the other server.
Otherwise you need to store sessions in mysql:
http://shiflett.org/articles/guru-speak-jan2005
While the default session storage mechanism is adequate for many PHP developers, you might find yourself wanting to modify its behavior from time to time. One of the most common reasons for wanting to change the default behavior is to store sessions in a database rather than the filesystem. The top reasons for this desire are:
1. The application needs to be able to run on multiple servers without server affininty (methods that direct requests from the same client to the same server). An easy way to make sure that sessions continue to work properly is to store sessions in a central database that is common to all servers.
www.movil.be Martin
Bookmarks