vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Cookies Pathing Problem - with Sub-Domain Installation (https://vborg.vbsupport.ru/showthread.php?t=180720)

NashChristian 05-27-2008 08:38 PM

Cookies Pathing Problem - with Sub-Domain Installation
 
Hello.

I setup a TEST site for my forums, on the same primary domain as my LIVE site, but with a subdomain of 'test'.

For example:

LIVE SITE: http://mysite.com

TEST SITE: http://test.mysite.com

The problem that I am experiencing, appears to be that my COOKIES are not configured correctly.

I can log-in to my forums (test site). I get the "thank you" message for logging in. However as soon as the page reloads, it "forgets" that I'm logged in and says that I don't have permission to post.

On my LIVE site all is working fine. I'm only experiencing this problem with my TEST site.

I'm pretty convinced that this must be in my cookie settings, but I don't know what to modify to fix this.

Please help.

Thanks!
Jeff

wrestlepower 05-27-2008 08:43 PM

try changing the options in vbulletin options> cookie and http header settings. Set them seperate for each domain or subdomain

NashChristian 05-27-2008 08:54 PM

Hello.

Thanks for the feedback.

I see where to change the settings, I just don't understand which setting I should change, and what I should change it to.

I see the "Path to Save Cookies", with a default of '/' with a suggested setting of '/forums/'. I've tried this, but it didn't help. I don't know if I need to implement some sort of custom setting, and if so then what?

I also see the "Cookie Domain", and in the drop down menu it has '.mysite.com' as an option, with the default being 'blank'. I've tried both settings and that doesn't seem to help either. Again I don't know if I need to implement some sort of custom setting, or if the "Path to Save Cookies" is really the problem, or both, or ???

DANG! Now that I tried changing the "Cookie Domain" to '.mysite.com', I can't even log into my AdminCP anymore! It thanks me for logging in, and goes directly back to my log on screen! Ahhhh!

PLEASE HELP!

Thanks.
Jeff

King Kovifor 05-27-2008 09:03 PM

Quote:

Originally Posted by NashChristian (Post 1533368)
Hello.

Thanks for the feedback.

I see where to change the settings, I just don't understand which setting I should change, and what I should change it to.

I see the "Path to Save Cookies", with a default of '/' with a suggested setting of '/forums/'. I've tried this, but it didn't help. I don't know if I need to implement some sort of custom setting, and if so then what?

I also see the "Cookie Domain", and in the drop down menu it has '.mysite.com' as an option, with the default being 'blank'. I've tried both settings and that doesn't seem to help either. Again I don't know if I need to implement some sort of custom setting, or if the "Path to Save Cookies" is really the problem, or both, or ???

DANG! Now that I tried changing the "Cookie Domain" to '.mysite.com', I can't even log into my AdminCP anymore! It thanks me for logging in, and goes directly back to my log on screen! Ahhhh!

PLEASE HELP!

Thanks.
Jeff

You would need to set it to /forums/ and /test/ for both cookie paths.

NashChristian 05-27-2008 09:19 PM

King, can you please be a little bit more specific. I'm getting afraid to monkey with these settings, since I just locked myself out of the AdminCP in IE for some reason.

I've cleared all browser cookies, catche, history, but for some reason, I still can't access EITHER AdminCP, not for my TEST site or my LIVE site (in IE), which is really wierd because I have not messed with my LIVE site at all today. Any idea what is going on here, or how I can rectify it? I still have access via FireFox for some reason, but not IE.

So are you saying to change the "Path to Save Cookies" to '/forums/' AND change the Cookie Domain to CUSTOM SETTING '/test/'?

Am I understanding you correctly?

Thanks!
Jeff

snakes1100 05-27-2008 09:23 PM

No, in each admincp for the live site and the test site, set the path to cookies as king stated, in the live site select forums from the drop menu as its a default option, in the test admincp the path you will ahve to set to custom as /test/ is not a default option.

If you get locked out, upload tools.php to the server in the admincp folder, open it in a browser and set the defautls back and then delete it from the server or rename it.

NashChristian 05-27-2008 09:51 PM

Thanks for the clarrification Snakes.

My forum paths, and URL's are different of course. I'm unsure whether this syntax is correct for my application. Let me clearly explain my URL & Pathing relationship, and please tell me if this exact syntax is still correct.

I'm using vBa as my 'Portal Home' page.

Quote:

LIVE SITE:

URL: http://NashvilleChristian.com (vBa portal home)
Path: /home/jfenton/public_html/NashvilleChristian/

http://NashvilleChristian.com/forums (vB forums)
/home/jfenton/public_html/NashvilleChristian/forums/
Quote:

TEST SITE:

URL: http://Test.NashvilleChristian.com (Test - vBa portal home)
Path: /home/jfenton/public_html/NashvilleChristian-Test/

http://Test.NashvilleChristian.com/forums (Test - vB forums)
/home/jfenton/public_html/NashvilleChristian-Test/forums/
Am I understanding correctly that I do NOT need to modify the "Cookie Domain" settings on either installation, but that I just need to modify the "Path to Save Cookies" on BOTH of my installations, my LIVE Site, and my TEST site?

Now that you have viewed my forum paths and URL relationships, is the syntax still correct which you listed above? '/forums/' on my LIVE site, and '/test/' on my TEST site?

Thanks again for all the help! I feel like a block head, but for some reason I am struggling with this. I didn't get freaked out until I started getting locked out of my admin-cp.

THANKS!
Jeff

snakes1100 05-27-2008 10:00 PM

No you should set cookie & path to custom.

test - test.domainname.com path /test/
live - www.domainname.com path /forums/

NashChristian 05-27-2008 10:23 PM

Snakes,

Ok.

So the fact that '/test/' is not actually a physical portion of my server PATH:
Quote:

/home/jfenton/public_html/NashvilleChristian-Test/forums/
Does NOT matter.

I still need to use '/test/' as the "Path to Save Cookies", merely to differentiate it from the other installation?

Is this right?

Thanks again!
Jeff

snakes1100 05-27-2008 10:26 PM

Yes thats correct.

Is this an actual directory? NashvilleChristian-Test

NashChristian 05-27-2008 10:28 PM

Thanks a lot for all the help!

Much appreciated!

:) Jeff

--------------- Added [DATE]1211931056[/DATE] at [TIME]1211931056[/TIME] ---------------

Quote:

Originally Posted by snakes1100 (Post 1533477)
Is this an actual directory? NashvilleChristian-Test

Yes. 'NashvilleChristian-Test' is the directory in my Cpanel, public_html which contains my entire Test site, through my hosting provider.

Do I need to path this differently? or will '/test/' suffice?

Thanks.
Jeff

snakes1100 05-27-2008 10:36 PM

Well technically the path for both is /forums/

If you still have issues do it like so:
/home/jfenton/public_html/NashvilleChristian/forums/
/home/jfenton/public_html/NashvilleChristian/test/

NashChristian 05-27-2008 10:45 PM

Quote:

Originally Posted by snakes1100 (Post 1533488)
Well technically the path for both is /forums/

If you still have issues do it like so:
/home/jfenton/public_html/NashvilleChristian/forums/
/home/jfenton/public_html/NashvilleChristian/test/

Don't you mean:

Quote:

/home/jfenton/public_html/NashvilleChristian/forums/
/home/jfenton/public_html/NashvilleChristian-Test/forums/
I'm sort of confused as to what the purpose is for this. If this MUST be an actual physical PATH, then I would think that I need to use the syntax I just listed. If the physical path doesn't matter, but we just need some syntax to differentiate between the two instances, then I could just use '/test/'. I'm just unclear what is needed here.

I'm afraid of screwing up, because it already locked me out once, and has warnings in the admincp:

Quote:

You most likely want to leave this setting blank as entering an invalid setting can leave you unable to login to your forum.
Please advise.

Thanks!
Jeff

snakes1100 05-27-2008 10:51 PM

Yes they both have a actual physical path, but they both end up in a directory named forums, so the path for both would be the same directory.

Move the test site to the directory i posted above and then change the path for the test site to test or do it this way as well:

/home/jfenton/public_html/NashvilleChristian-Test/test/

Getting locked out isnt a big deal, you can always get back in by using the tools.php file.

NashChristian 05-27-2008 11:12 PM

Dang, so you're saying that I need to physically change the name of my test directory on the server?

This will require me to repath all of my vBa config files, etc...

So this cookie path is supposed to get you to the "forums" folder, correct?

So are you saying to rename the "forums" folder "test", and then set the cookie path to '/test/' because then that directory will exist?

I had hoped that I could differentiate between their parent directories "NashvilleChristian" and "NashvilleChristian-Test".

I really don't want to change my file structure or naming convention, unless there simply is no other option.

Thanks for the help.
Jeff

--------------- Added [DATE]1211941837[/DATE] at [TIME]1211941837[/TIME] ---------------

I think that I figured out my problem. I don't believe that I needed to modify any of my cookie settings in the AdminCP.

All that I appear to have needed to modify was my forums/includes/config.php (on line 92) as follows:

PHP Code:

$config['Misc']['cookieprefix'] = 'HERE'

I needed to use a unique cookie prefix, so that my browser would not become confused between the cookies of my TEST site and my LIVE site. Do this by replacing the text HERE above with the prefix of your choice.

After setting this correctly, I reverted the "Path to Save Cookies" AND the "Cookie Domain", in the AdminCP, to the vB default settings. I don't believe that I ever needed to monkey with that part at all.

Everything appears to be working well at the moment. If there is some unforseen reason why this is not configured ideally, someone please let me know. Otherwise, I think that I'm good for now.

Thanks for the help everyone!
:D Jeff


All times are GMT. The time now is 04:54 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01205 seconds
  • Memory Usage 1,786KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (15)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete