False redirection after login

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
User avatar
pierredu
Registered User
Posts: 918
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

False redirection after login

Post by pierredu » Thu Mar 28, 2019 1:08 pm

Hello,

I installed a local board on a computer with quickinstall and copied thereafter a dump of the real database in the dummy database created by QI. This way, I have a complete copy of my board on a local server, to do update tests. The board behaves normally, I can edit messages, post new ones, etc. I could install a language pack, a new style, etc.

After copying all PHPbb files (excepted config.php and the folders files, store and images), when I return to the board, it asks me to login (albeit I had asked to be remembered, but this may be a detail). I type name and password and hit Enter.

Now comes the curious behaviour: I'm redirected to the real board (on the distant server) and not to the local one.
Does it ring a bell?
I can't figure the reason of this behaviour.

Thanks in advance.

User avatar
david63
Registered User
Posts: 16058
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: False redirection after login

Post by david63 » Thu Mar 28, 2019 1:11 pm

Did you change the cookie and board setting in the config table when you copied it over?
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
P_I
Registered User
Posts: 921
Joined: Tue Mar 01, 2011 8:35 pm
Location: Calgary
Contact:

Re: False redirection after login

Post by P_I » Thu Mar 28, 2019 1:16 pm

You are describing my standard localhost testbed setup. There are some ACP settings that need changing as david63 mentions.

After restoring the "real database", I've got a SQL script that I run to adjust a few configuration values so they match the localhost setup. It contains the following:

Code: Select all

UPDATE phpbb_config SET config_value ='' WHERE config_name='cookie_domain';
UPDATE phpbb_config SET config_value ='<www.example.com>' WHERE config_name='server_name';
UPDATE phpbb_config SET config_value ='<username@example.com>' WHERE config_name='board_email';
UPDATE phpbb_config SET config_value = '0' WHERE config_name='email_enable';
UPDATE phpbb_config SET config_value ='<My forum name> - replica' WHERE config_name='sitename';
UPDATE phpbb_config SET config_value ='1' WHERE config_name='force_server_vars';
Change phpbb_config to match your database and anything in the <...> to match your setup.
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams

User avatar
pierredu
Registered User
Posts: 918
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

Re: False redirection after login

Post by pierredu » Thu Mar 28, 2019 2:03 pm

david63 wrote:
Thu Mar 28, 2019 1:11 pm
Did you change the cookie and board setting in the config table when you copied it over?
No. This may be the cause.

@P_I
Thanks for the script.

I'll try again with this.

User avatar
P_I
Registered User
Posts: 921
Joined: Tue Mar 01, 2011 8:35 pm
Location: Calgary
Contact:

Re: False redirection after login

Post by P_I » Thu Mar 28, 2019 3:50 pm

pierredu wrote:
Thu Mar 28, 2019 2:03 pm
@P_I
Thanks for the script.
Your welcome. Always glad to share my experiences and knowledge back to the community. I trust you can figure out what each entry does.

The config_name='email_enable' entry is there to prevent leakage of the testing environment via notifications for bookmarks/subscribed topics/forums.

When I first started doing this I confused a few of my board members when they received notification emails that didn't make sense to them.
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams

User avatar
pierredu
Registered User
Posts: 918
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

Re: False redirection after login

Post by pierredu » Fri Mar 29, 2019 1:44 pm

Well, I think I now installed a correct board.

You could add to your script a line for the script_path config variable.
Likewise, a correct entry for the variables server_protocol and server_port can be useful (my localhost uses http and not https).

User avatar
Lumpy Burgertushie
Registered User
Posts: 66230
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: False redirection after login

Post by Lumpy Burgertushie » Fri Mar 29, 2019 7:30 pm

unless you have "force url" set to yes, then none of those settings have any effect so they can be left blank.

robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

User avatar
pierredu
Registered User
Posts: 918
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

Re: False redirection after login

Post by pierredu » Sat Mar 30, 2019 6:44 am

This parameter was set to yes on the source board, indeed.

Post Reply

Return to “[3.2.x] Support Forum”