Recent Topics

1 Jan 12, 2009 01:47    

My b2evolution Version: Not Entered

Here is a restatement of my previous question which took 20 minutes to compose and was rejected as "spammy."

I changed Blog URL to absolute so the blog was in the root web directory. I put a stub file for the blog in the root directory--and changed the config path in the stub file so that it still pointed to the b2evolution directory.

After that, I could access the blog no problem in the root directory (www.example.com/test.php). I could see all of the archives, etc. However login failed. I got the login dialog box but the blog screen that appeared had none of the logged in features, bar at top etc. If I go the original URL (www.example.com/b2evolution/blog6.php) everything works fine including login.

Any advice on how to set a relative URL and still have login work?

2 Jan 12, 2009 01:48

The version was 2.4.5

3 Jan 12, 2009 09:36

You'll need to change the cookie settings in /conf/_advanced.php

/**
 * 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 );

// set cookie path to root folder
$cookie_path = '/';

You'll also save yourself a smidge of pain if you change $instance_name to something new ( same file ) at the same time ;)

¥

4 Jan 12, 2009 16:45

Thanks, nice person.

Confirming: Replacing the cookie path alone did not solve the login failure. When I changed $instance_name from 'b2evo' to 'b2evo1', that did the trick.

How about the warning in comments not to play with this or "tons of cookies will be sent away" and users will complain? Any concerns there?

5 Jan 12, 2009 18:53

Most people who end up changing that setting only do so after making a post like yours on the forums, and they pretty much always get told to change the instance name at the same time ;)

¥


Form is loading...