A tiny bug in login/logout redirection?

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
mathena
Registered User
Posts: 7
Joined: Sun May 29, 2005 11:55 am

A tiny bug in login/logout redirection?

Post by mathena » Sun May 29, 2005 12:15 pm

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

to 
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 :?

Killer_X
Registered User
Posts: 216
Joined: Sat May 28, 2005 11:40 pm
Location: Jesenice - Slovenia
Contact:

Post by Killer_X » Sun May 29, 2005 12:18 pm

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).

[edit]
Its in config.php only.
[/edit]
Long live open source - free source!

mathena
Registered User
Posts: 7
Joined: Sun May 29, 2005 11:55 am

I can't find the config

Post by mathena » Sun May 29, 2005 12:21 pm

Code: Select all

<?php


// 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

Killer_X
Registered User
Posts: 216
Joined: Sat May 28, 2005 11:40 pm
Location: Jesenice - Slovenia
Contact:

Post by Killer_X » Sun May 29, 2005 12:23 pm

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:
Long live open source - free source!

Killer_X
Registered User
Posts: 216
Joined: Sat May 28, 2005 11:40 pm
Location: Jesenice - Slovenia
Contact:

Post by Killer_X » Sun May 29, 2005 12:25 pm

Ok I found it, it's in the db in table {PREFIX}_config. You need to edit the value of 'script_path'.

[edit]
I had phpMyAdmin at limit of 30 rows and therefore the first time this one didn't show up
Long live open source - free source!

mathena
Registered User
Posts: 7
Joined: Sun May 29, 2005 11:55 am

Thank you all the same

Post by mathena » Sun May 29, 2005 12:27 pm

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:)

Killer_X
Registered User
Posts: 216
Joined: Sat May 28, 2005 11:40 pm
Location: Jesenice - Slovenia
Contact:

Post by Killer_X » Sun May 29, 2005 12:28 pm

Above your post... ;)
Long live open source - free source!

mathena
Registered User
Posts: 7
Joined: Sun May 29, 2005 11:55 am

Such a serect place!

Post by mathena » Sun May 29, 2005 12:31 pm

Who will find the config in the DB is related to the redirection?
HAHA
Because I am a java programer so I don't think it is a good design
--
Thank you very much, an accommodating expert!

mathena
Registered User
Posts: 7
Joined: Sun May 29, 2005 11:55 am

Bingo!

Post by mathena » Sun May 29, 2005 12:41 pm

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

Killer_X
Registered User
Posts: 216
Joined: Sat May 28, 2005 11:40 pm
Location: Jesenice - Slovenia
Contact:

Post by Killer_X » Sun May 29, 2005 12:42 pm

You can edit those values via ACP :)
Sorry but I automatialy thought you cannot access it :oops:
Long live open source - free source!

mathena
Registered User
Posts: 7
Joined: Sun May 29, 2005 11:55 am

ha

Post by mathena » Sun May 29, 2005 12:47 pm

I am sorry,
but what is ACP?

Killer_X
Registered User
Posts: 216
Joined: Sat May 28, 2005 11:40 pm
Location: Jesenice - Slovenia
Contact:

Post by Killer_X » Sun May 29, 2005 12:48 pm

Admin control pannel
Long live open source - free source!

mathena
Registered User
Posts: 7
Joined: Sun May 29, 2005 11:55 am

oh

Post by mathena » Sun May 29, 2005 12:56 pm

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.

Killer_X
Registered User
Posts: 216
Joined: Sat May 28, 2005 11:40 pm
Location: Jesenice - Slovenia
Contact:

Post by Killer_X » Sun May 29, 2005 12:58 pm

Np, that's what tis forum is for :)
Long live open source - free source!

sickmusic
Registered User
Posts: 24
Joined: Fri Oct 25, 2002 1:22 pm
Location: London, UK
Contact:

Post by sickmusic » Tue Jun 14, 2005 12:14 pm

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!

Locked

Return to “2.0.x Support Forum”