Login on pages outside forum root

Discussions about the phpBB3 Forum. How to get the best from this powerful script.
Note that there is no official support for phpBB3 here, a place to share more than to ask for.

Moderator: Moderators

Login on pages outside forum root

Postby media12 » Tue Apr 07, 2009 7:15 am

I have a forum located on site.com/forum/

And I have added a page: site.com/testpage.php

The code in testpage.php is:

Code: Select all
<?php
    define('IN_PHPBB', true);
    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forum/';
    $phpEx = substr(strrchr(__FILE__, '.'), 1);
    include($phpbb_root_path . 'common.' . $phpEx);

    // Start session management
    $user->session_begin();
    $auth->acl($user->data);
    $user->setup();

    page_header('Gallery');

    $template->set_filenames(array(
        'body' => 'gallery_body.html',
    ));

    make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
    page_footer();
?>


The problem is now that when I log into the /forum/ and then go testpage.php I'm not longer logged in.


If I add the testpage.php in /forum/testpage.php and change the location to:
Code: Select all
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';




I don't know if this is has anything to do with this, but here are my cookie settings:

.site.com
phpbb3_f4gnh
/forum/
Disabled


I'm running on a Windows -server 2008 if that might help you in guessing.


Please, can anyone help me with this? I would really really appreciate it!

Then it works when I visit site.com/forum/testpage.php, but I want it to work when I have it in site.com/testpage.php
media12
 
Posts: 10
Joined: Thu Sep 18, 2008 9:38 pm

Advertisement

Re: Login on pages outside forum root

Postby dcz » Tue Apr 07, 2009 7:44 am

Try with
Code: Select all
/

as cookie path, should do it ;)
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21325
Joined: Fri Apr 28, 2006 9:03 pm

Re: Login on pages outside forum root

Postby media12 » Tue Apr 07, 2009 8:59 am

dcz wrote:Try with
Code: Select all
/

as cookie path, should do it ;)


That didn't work, if I use just "/" i can login to the forum on site.com/forum, and it says "You have been successfully logged in." but when it redirects me back to the index, I automatically get logged out. :(
media12
 
Posts: 10
Joined: Thu Sep 18, 2008 9:38 pm

Re: Login on pages outside forum root

Postby dcz » Tue Apr 07, 2009 9:13 am

Have you deleted your browser's cache and cookie once you updated the cookie path ?
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21325
Joined: Fri Apr 28, 2006 9:03 pm

Re: Login on pages outside forum root

Postby media12 » Tue Apr 07, 2009 9:27 am

dcz wrote:Have you deleted your browser's cache and cookie once you updated the cookie path ?


Forgot that, it's working perfectly now!!! Big big thanks! =)
media12
 
Posts: 10
Joined: Thu Sep 18, 2008 9:38 pm


Return to phpBB Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 9 guests