1 quard Feb 13, 2007 20:16
3 quard Feb 14, 2007 09:25
Right now I'm stumped.
1. If I go to www.mydomain.com and log in I'm fine until I view comments (or click on any links.) And have to log back into backoffice anytime I go there.
2. If I go to www.mydomain.com/subdirectory (where my blog is located) and log in, I see that I'm logged in and the edit posts option is under all posts like it should be. And I don't have to relog in to go to backoffice.
All links have the /subdirectory in them, like they should and this is probably why #1 is a problem. *shrug* I know it's something stupid, I just know it...
4 quard Feb 15, 2007 07:47
Could the problem be I need a stub file? So that no matter how I access the blog at www.mydomain or www.mydomain/subdomain I can log in just fine and not lose being logged in?
5 nate Feb 15, 2007 16:10
It's worth a try. :-)
6 quard Feb 15, 2007 17:48
Has anyone come across this login problem?
7 nate Feb 15, 2007 19:12
You never said what your baseurl was set as and if you tried changing it. You may also want to delete the cookie that your browser has and then try going to www.mydomain.com and seeing if it works after logging in.
I'm guessing that your baseurl is set to www.mydomain.com/subdirectory when it should perhaps be set to www.mydomain.com.
8 quard Feb 15, 2007 19:34
Yep, my baseurl is indeed www.mydomain.com/subdir. I assume I have to change it in _basic_config.php? but when I tried changing it the blog messed up.
9 edb Feb 15, 2007 20:14
Your $baseurl needs to be where you have b2evolution installed, so if you have it installed in /subdir/ then that's what your $baseurl should say (and don't forget you need the trailing slash). That's also the path you'll have to follow to find your back office because that comes from yourdomain/yourpath/admin.php - and "yourdomain/yourpath/" happens to be your $baseurl value.
The www thing is just another pain in the butt. Sometimes servers still expect a domain to have it, sometimes they don't. Personally I don't like it so I don't use it. If it's in your $baseurl then that bit will be included in all internal links b2evolution generates AND will be part of your cookie.
Anyway it makes sense that if your installation is in /subdir/ and your $baseurl has /subdir/ at the end of it then you won't be able to login, or be recognized as logged in, without it.
10 quard Feb 16, 2007 07:09
Thanks Ed. The real weird thing is when my blog was in www.mydomain/blogs I never had this login/stay login problem I've described. I was using 0.9.1. We recently upgraded to 1.9.x (and changed the subdir the blog is in to avoid bots that were attacking us) and then viola this login problem I've never had before. The only changes is the version we are running and the subdir it's in now. It was always in a subdir and no matter how I accessed it via www.mydomain.com/blogs or www.mydomain.com I never had login issues at all. Trying to figure out what's the deal affecting it.
11 yabba Feb 16, 2007 09:59
This is possibly a cookie problem. Crack open conf/_advanced.php and have a play with the following section of code :-
/**
* This is the path that will be associated to cookies.
*
* That means cookies set by this b2evo install won't be seen outside of this path on the domain below.
*
* @global string Default: preg_replace( '#https?://[^/]+#', '', $baseurl )
*/
$cookie_path = preg_replace( '#https?://[^/]+#', '', $baseurl );
/**
* Cookie domain.
*
* That means cookies set by this b2evo install won't be seen outside of this domain.
*
* We'll take {@link $basehost} by default (the leading dot includes subdomains), but
* when there's no dot in it, at least Firefox will not set the cookie. The best
* example for having no dot in the host name is 'localhost', but it's the case for
* host names in an intranet also.
*
* @global string Default: ( strpos($basehost, '.') ) ? '.'. $basehost : '';
*/
$cookie_domain = ( strpos($basehost, '.') ? '.'. $basehost : '' );
If it was me I'd probably be trying $cookie_path = '/'; ;)
¥
12 quard Feb 16, 2007 19:27
YAAAABBBBAAA! How dare you fix such a vexing problem so $%^#@ing easily! :p :lol: :p
Yabba-dabba-do! Mucho thanks!
13 yabba Feb 16, 2007 19:34
lol, anytime ;)
¥
14 chrpeder Feb 20, 2007 01:26
thanks a lot for this. This solved a similar problem I had when usinh subdomain with b2evo.
Thanks!
15 quard Feb 21, 2007 17:35
Yabba is a genius. There are so many files, variables and options in b2 that unless you know exactly what you're looking for sometimes, you're hosed.
Now if Yabba did not come up w/the answer, I'd still bestow the genius title albeit with a hint of mockery :)
16 yabba Feb 21, 2007 17:40
lol, wow, wonder what I could achieve if I wasn't a blonde? :P
¥
17 stk Feb 21, 2007 17:46
Don't wonder too long ... you might hurt yerself. :p
18 yabba Feb 21, 2007 17:51
No worries, my brain has an auto-cutoff switch that kicks in every 1,000,000th of a second :D
¥
19 quard Feb 22, 2007 07:20
Brrrraaaaiiinnnsss :)
In the backoffice under your blog settings you should have a section where you set a "base url" for your blog(s). I would double check this setting and maybe play around with it some. The cookie that is set when you are logged in is based upon the baseurl and so the cookie might not fly into action unless it sees the url it's looking for.