Page 1 of 1

A tiny bug in login/logout redirection?

Posted: Sun May 29, 2005 12:15 pm
by mathena
I wanna to report a tiny bug of phpBB
In my computer, I firstly installed the phpBB in the root directory of Apache,everything goes well. This morning I published my own page as index.php so I move the whole part of phpBB to a subdirectory called "bbs"
Everything goes well except the login and logout
For example , when I want to login ,the page redirected to http://myweb/login.php rather than http://myweb/bbs/login.php
It is the same with logout because they acturally invoke the same login.php with different arguments
As I am a learner of php,I tried to change the source code of login.php
//I don't know if I break the licence of phpBB?
I replaced every statements like

Code: Select all

redirect(append_sid("index.$phpEx", true));

Code: Select all

redirect(append_sid("bbs/index.$phpEx", true)); 
It works well now! But I don't think it is an elegant way to solve this problem
Any guru have wanderful suggestions? Or is it a tiny bug of phpBB?

//I am a Chinese student and my English is not very good. :p :?

Posted: Sun May 29, 2005 12:18 pm
by Killer_X
It's not a bug, it's a problem because after you move it the forum became misconfigured. You have to edit the paths (in the DB adn config.php I think).

Its in config.php only.

I can't find the config

Posted: Sun May 29, 2005 12:21 pm
by mathena

Code: Select all


// phpBB 2.x auto-generated config file
// Do not change anything in this file!

$dbms = 'mysql4';

$dbhost = 'localhost';
$dbname = 'phpbb';
$dbuser = '**';
$dbpasswd = '**';

$table_prefix = 'phpbb_';

define('PHPBB_INSTALLED', true);

This is the config.php tell me nothing about the directory i think

Posted: Sun May 29, 2005 12:23 pm
by Killer_X
Sorry... but where are the paths then .. :-/
I don't know exactly now, because I had no need to edit them yet, so perhaps someone who knows can point you to the right file. :oops:

Posted: Sun May 29, 2005 12:25 pm
by Killer_X
Ok I found it, it's in the db in table {PREFIX}_config. You need to edit the value of 'script_path'.

I had phpMyAdmin at limit of 30 rows and therefore the first time this one didn't show up

Thank you all the same

Posted: Sun May 29, 2005 12:27 pm
by mathena
I checked all files seems like a config yet no finding
But I find that in profile.php,also a redirection statement like i reported
So, i think if my judgement is right , the same 'bug' will occur in profile.php
Any way, thank u very much:)

Posted: Sun May 29, 2005 12:28 pm
by Killer_X
Above your post... ;)

Such a serect place!

Posted: Sun May 29, 2005 12:31 pm
by mathena
Who will find the config in the DB is related to the redirection?
Because I am a java programer so I don't think it is a good design
Thank you very much, an accommodating expert!


Posted: Sun May 29, 2005 12:41 pm
by mathena
I resolved the problem by change the value in the DB according to you words
Thank you

But I think phpBB need to provide an interface to setup this for some body rather than leave this problem to a SQL statement :)
//There are 61 values in Config file:) what a hugu number for rookie

Posted: Sun May 29, 2005 12:42 pm
by Killer_X
You can edit those values via ACP :)
Sorry but I automatialy thought you cannot access it :oops:


Posted: Sun May 29, 2005 12:47 pm
by mathena
I am sorry,
but what is ACP?

Posted: Sun May 29, 2005 12:48 pm
by Killer_X
Admin control pannel


Posted: Sun May 29, 2005 12:56 pm
by mathena
oh yeah I find it
I am so shamed Embarassed
The ACP is quite well.Smile
Think you!
It is 9:00pm in Beijing.I must logout and pick my girlfriend
Thank you! I learned a lot form u.

Posted: Sun May 29, 2005 12:58 pm
by Killer_X
Np, that's what tis forum is for :)

Posted: Tue Jun 14, 2005 12:14 pm
by sickmusic
just had the same prob after moving hosts.

changed the following in _config table:
- server_name
- cookie_name
- cookie_domain

using phpMyAdmin. Couldn't use the ACP, as every time a user logged in, it would log into the old server.

But problems solved for me. Thanks!