Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Sessions across subdomains
  • The app I'm working on has dynamic subdomains and I need my simpleauth login session to be available across any subdomain as well as the main domain (without a subdomain). I tried setting my cookie_name to '.mydomain.com' and also tried using db sessions, but neither have worked for me. Anyone have any ideas? Chris
  • "Problem" resolved - I was only setting the session config and not the cookie config in the main config file.
  • Hi I have the same problem cearis. Can you please explain more in detail how you solved this issue? I have default cookie settings in my config.php:

        /**
         * Cookie settings
         */
        'cookie' => array(
            // Number of seconds before the cookie expires
            'expiration'  => 0,
            // Restrict the path that the cookie is available to
            'path'        => '/',
            // Restrict the domain that the cookie is available to
            'domain'      => null,
            // Only transmit cookies over secure connections
            'secure'      => false,
            // Only transmit cookies over HTTP, disabling Javascript access
            'http_only'   => false,
        ),


    Thanks,
    Jume
  • If you have subdomains (like a.example.org and b.example.org), you need to set the 'domain' to ".example.com", so your domain name plus a leading dot.

    If not set it defaults to hostname.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion