1. Open file cake/libs/session.php
2. Find method __initSession()
3. Comment two lines with ini_set('session.referer_check', $this-
host);
4. Add
ini_set('session.cookie_domain', '.yourdomain.com');
before switch (Configure::read('Session.save')) {
5. Clear all cookies in browser for your domain
Since I've done all of your suggestions an I'm still having no success
perhaps it's the way that I'm doing my subdomains. Here's how I'm
doing it. Let me know what you think. In my routes.php I have:
$subdomain = substr(env(HTTP_HOST), 0, strpos(env(HTTP_HOST),
.));
if ($subdomain == 'api') {
}
You also need to set the realm of the session cookie to your domain
(it defaults to the hostname) and set the security level of the
security component below 2
On 3/8/10, Kyle Decot kdec...@gmail.com wrote:
Well my sessions.save is set to database in my core.php file. Also, I
did $session-read()
Where do I set the realm for the session cookie? The security level in
my core.php file is set to low.
On Mar 8, 6:47 am, Bernardo Vieira bvieira.li...@gmail.com wrote:
You also need to set the realm of the session cookie to your domain
(it defaults to the hostname) and set the security level
I have it in my beforeFilter callback in app_controller:
$this-Cookie-domain = '.mydomain.tld';
Note that the '.' before your domain name is what tells the browser that the
cookie is valid for *.mydomain.tld.
On Mon, Mar 8, 2010 at 4:50 PM, Kyle Decot kdec...@gmail.com wrote:
Where do I set
I inserted that but still when I go to blog.mysite.com and do $this-
Session-read(); in my app_controller.php's beforeRender() It doesn't
contain my user information. Any other ideas or suggestions?
On Mar 8, 3:05 pm, Bernardo Vieira bvieira.li...@gmail.com wrote:
I have it in my beforeFilter
My first guess would be that you lost session data when you went to the
subdomain. Maybe because the session cookies weren't sent with the
requests going to the subdomain or maybe something else, I'm can't see
whats happening on your servers The point is it's easy to check if
the session was
Well my sessions.save is set to database in my core.php file. Also, I
did $session-read() on my www page and I get all of my auth info,
however if I do the same thing on, blog.mysite.com then auth is now
empty. Any ideas on next steps to take towards solving this? Thanks
guy.
On Mar 7, 8:36 pm,