Session creates new session id on every page load |
[eluser]WanWizard[/eluser]
The cookie domain must be the hostname, or the domain part of the hostname. It may not contain 'http://'. The underscore is in 'sess_cookie_name' (by default it is set to "ci_session", which is a very bad default).
[eluser]Lockzi[/eluser]
[quote author="WanWizard" date="1287063646"]The cookie domain must be the hostname, or the domain part of the hostname. It may not contain 'http://'. The underscore is in 'sess_cookie_name' (by default it is set to "ci_session", which is a very bad default).[/quote] Thank you! It was the "http://" in the cookie domain that caused the problems for me! I solved the problem by using: Code: $config['cookie_domain'] = str_replace("http://", "", str_replace("https://", "", $config['base_url'])); Really grateful, Lockzi
[eluser]WanWizard[/eluser]
I use this: Code: // determine the domain and the path from the base_url
[eluser]Lockzi[/eluser]
[quote author="WanWizard" date="1287080532"]I use this: Code: // determine the domain and the path from the base_url Yours didn't work for me at all... Code: Notice: Undefined index: path in /home/auinterface/public_html/application/config/config.php on line 257 The reason is that my $base_url_parts only exists of: Code: Array ( [scheme] => http [host] => subdomain.domain.se ) 1 You need to set path to '/' as default in case of the application actually is in the web root. This would be a solution: Code: // determine the domain and the path from the base_url But I really rather go with mine in that case... EDIT: I just realized a huge problem... I'm not ending the $config['base_url'] with /. Thanks for allowing me to find that problem
[eluser]Unknown[/eluser]
I have this problem, I try everything but cant solve... Any one help me plz...
[eluser]stirado[/eluser]
Same here. I tried everything suggested on this thread but the problem remains. I'm running Codeigniter Reactor 2.0.2 (also tried with latest Core version) on a Wampserver 2.1a on top of Windows Vista and my application works flawlessly. When I move it to a LAMP Ubuntu Server 11.04 and watch the member_session table (see configuration below) I see that each time I load a page two new rows appear with a different session_id Code: $config['base_url'] = 'http://intranet.example.com'; As I said, I already tried everything suggested on this thread and other threads as well. One of the comments suggests that the problem could be with the Apache configuration. I'm using the default, I just added the ServerName directive Code: <VirtualHost *:80> Someone suggested this problem should be solved in two minutes. I've been stuck for several days. I'm willing to pay to have this solved. Someone willing to help?
[eluser]stirado[/eluser]
FWIW. In my case the problem was that the user_agent field on the ci_sessions database table didn't have enough space, so the query wasn't finding the cookie and went ahead to insert a new one.
[eluser]Unknown[/eluser]
A recent change in CI-Reactor was made to the session table (user_agent was changed from a length of 50, to 120). The CI User Guide that is available from the website has yet to be updated with the latest version. The proper sql for the session table is as follows: Code: CREATE TABLE IF NOT EXISTS `ci_sessions` ( This change can be found at the Bitbucket repo here.
[eluser]Unknown[/eluser]
I have already been running my dev environment as a vhost with a fake domain, and I followed the rest of the advice in this thread as closely as possible. However I am still getting a brand new session on each page load. I can’t even get it to work with an actual domain in a staging environment. http://www.thomassabojewelleryaustralia.com/ |
Welcome Guest, Not a member yet? Register Sign In |