Jump to content

changing cookie path for login


scottcowan

Recommended Posts

I'm building a site with whmcs in a subdir and another site in the root dir

 

whmcs uses the subdir as the cookie path for WHMCSUID,WHMCSPW so the root site can't access the cookies in php as far as I know.

 

is there an addon out there so I can change the cookie path, I noticed Kayako LoginShare does this but I can't see how to get it.

 

Thanks

Link to comment
Share on other sites

If you want to be able to pass session data between subdomains you need to add the following to the php.ini file.

 

session.cookie_domain = .domain.com

 

Note the dot before your domain. This is required.

 

If you are unable to modify the the php.ini file you can add the following before the session.start() function on any page which creates the session cookie.

 

ini_set("session.cookie_domain", ".domain.com");

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated