Recent Topics

1 Apr 29, 2007 18:17    

My b2evolution Version: 1.9.x

Hello,
I posted before about not being able to log in with a custom skin, and I've found out something interesting: the problem actually happens when using a stub file, regardless of what skin is being used. I'm assuming there's a problem with my settings that is messing up the cookies.

Run down:

I have one blog with the following settings:
Blog folder URL: Relative to base URL
Access type: Explicit reference with index.php

If I call the blog directly with www.mydomain.com/blogs/index.php?blog=2 everything works fine and I can log in with no problems.

I have another blog with the following settings:
Blog folder URL: Absolute URL (www.mydomain.com/)
Preferred access type: Explicit reference to stub file (blog3.php)

I have a stub file named www.mydomain.com/blog3.php which points to the blog. When I access the stub file, the blog loads up just fine but I can not log in!

Any ideas??

2 Apr 30, 2007 01:00

You will need to login first... by going to

www.mydomain.com/blogs/admin.php 

Then, when you go in through your blog stub file assuming it's in the same path as your blogs like

www.mydomain.com/blogs/mynewblog.php

you should now see a "link" at the bottom of your pages to access your "back office" that way.

I am surprised that stub file worked to access your blog since you show the stub file located outside of your blog directory (unless you have done some fancy path work in there, which I would love for you to share).

And although that might be possible (assessing the blog from there) I think that to be able to access the back office from a remote location away from your blog directory, you need to do some really fancy ¥åßßå style work on those paths in the stub file... It has been discussed here, so check out the threads on that (I think they are the subdomain access threads).

3 Apr 30, 2007 03:45

I see! I didn't know that having stubs outside the base url would cause a problem (because everything else has been working until now!). I'll play around with the baseurl settings and see how things go.... once my hosting company fixes their server so I can log in :(

Thanks for the help!

Edit: Oh yeah. I forgot to tell you how I got the stubs to work outside of that directory. It's pretty easy, you just have to alter the path to the config file specified in the stub to account for the new location. For mine, I just change the line:

require_once dirname(__FILE__).'/conf/_config.php';

To:

require_once dirname(__FILE__).'/blogs/conf/_config.php';

Everything will work just fine, including passing variables through the stub, except for cookies :(

4 Apr 30, 2007 08:50

Your problem is that the cookies are being set at the folder level. To solve it crack open conf/_advanced.php and wander down to about line 302 and change it like this :

/**
 * 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 = '/';

¥

5 Apr 30, 2007 17:57

That didn't work :(

But I got it working by moving all my stubs within the blogs directory. I replaced the old stub files with redirect files so there aren't any broken links. Thanks for the reply!


Form is loading...