MyBB Community Forums

Full Version: Multiple Cookie Paths??
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Alright so I have my forum installed in directory "forum". I have a nice looking login page as my main index page, it is coded to check if the user is logged in and if so it directs them straight to the forum, if not they stay on the login page.

This is done by reading the cookies, I had to make my cookie path "/" to do this so the entire server can access the cookie. My problem now is when I try to use the adminCP it logs me out with every link I click. If I change the cookiepath back to "/forum/" the AdminCP will work just fine but the login page does not!

Is there any way I can fix this? Maybe have the login/logout on two different paths? IE both /forum/ and /? Maybe have MyBB plant it in /forum/ and write a script to copy all cookies from /forum/ to /?

Thanks for the help!
Do you encounter the same problem on other browsers?
(2011-10-09, 11:07 AM)HybridForum Wrote: [ -> ]Do you encounter the same problem on other browsers?

Yes, this problem is in every browser.
My friend had the same problem recently. The solution is to make the cookie path empty.
I have the same setup, but no issues. Edit your settings in ACP to use "/" and save that. Then go to FTP and download a copy of /forum/inc/settings.php and then delete the file from your server. Clear your browser cache and cookies and then log back in. You should be set.
(2011-10-09, 09:35 PM)pyridine Wrote: [ -> ]My friend had the same problem recently. The solution is to make the cookie path empty.

hehe

indeed
WOW Thanks for the help guys! I made the cookie path empty and it seems to be working just fine. If I have any problems later on I will try pavemen's method.