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 and subdomains and
test it
On Mar 9, 1:25 pm, Kyle Decot <[email protected]> wrote:
> 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') {
>
> }
>
> else if(....
>
> Then in my hosting cpanel, I go to the subdomains tab and add a newsubdomain,
> and set my cake app directory as the path for thesubdomain. Is this an
> acceptable way of doing this or could this be
> the cause of myproblems.
>
> On Mar 8, 5:28 pm, Kyle Decot <[email protected]> wrote:
>
> > 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 <[email protected]> wrote:
>
> > > 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 <[email protected]> wrote:
> > > > 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 <[email protected]> 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 of the
> > > > > security component below 2
>
> > > > > On 3/8/10, Kyle Decot <[email protected]> wrote:
>
> > > > > > 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 myauthinfo,
> > > > > > however if I do the same thing on, blog.mysite.com thenauthis now
> > > > > > empty. Any ideas on next steps to take towards solving this? Thanks
> > > > > > guy.
>
> > > > > > On Mar 7, 8:36 pm, Nabil Alsharif <[email protected]> wrote:
> > > > > >> 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 thesubdomainor 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 lost, that wold be the first thing I'd look at.
> > > > > >> Good
> > > > > >> luck.
>
> > > > > >> On Sun, 2010-03-07 at 15:25 -0800, Kyle Decot wrote:
> > > > > >> > Yep. It's all one Cake App. Any ideas?
>
> > > > > >> > On Mar 7, 11:43 am, cricket <[email protected]> wrote:
> > > > > >> > > Asubdomainis usually a completely separate site. Do you already
> > > > > >> > > have
> > > > > >> > > the same Cake app serving all of your subdomains?
>
> > > > > >> > > On Mar 6, 5:34 pm, Kyle Decot <[email protected]> wrote:
>
> > > > > >> > > > I have a couple different subdomains on my site but I am
> > > > > >> > > > having
> > > > > >> > > > some
> > > > > >> > > >problemsw/ theAuthComponent. I login fine under the standard
> > > > www
> > > > > >> > > >subdomainbut then if I go to a differentsubdomain, then I am
> > > > no
> > > > > >> > > > longer logged in. How do I make sure that myAuthlogin
> > > > > >> > > > persists
> > > > > >> > > > across all of my subdomains?
>
> > > > > >> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > > > others
> > > > > >> > with their CakePHP related questions.
>
> > > > > >> > You received this message because you are subscribed to the
> > > > > >> > Google
> > > > > >> > Groups "CakePHP" group.
> > > > > >> > To post to this group, send email to [email protected]
> > > > > >> > To unsubscribe from this group, send email to
> > > > > >> > [email protected]<cake-php%[email protected]
> > > > > >> > om>For more options, visit this group
> > > > > >> > athttp://groups.google.com/group/cake-php?hl=en
>
> > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > > > others
> > > > > > with their CakePHP related questions.
>
> > > > > > You received this message because you are subscribed to the Google
> > > > Groups
> > > > > > "CakePHP" group.
> > > > > > To post to this group, send email to [email protected]
> > > > > > To unsubscribe from this group, send email to
> > > > > > [email protected]<cake-php%[email protected]
> > > > > > om>For more options, visit this group at
> > > > > >http://groups.google.com/group/cake-php?hl=en
>
> > > > > --
> > > > > Sent from my mobile device
>
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers
> > > > with their CakePHP related questions.
>
> > > > You received this message because you are subscribed to the Google
> > > > Groups
> > > > "CakePHP" group.
> > > > To post to this group, send email to [email protected]
> > > > To unsubscribe from this group, send email to
> > > > [email protected]<cake-php%[email protected]
> > > > om>For more options, visit this group at
> > > >http://groups.google.com/group/cake-php?hl=en
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en