Locked out

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
astecme2
Registered User
Posts: 6
Joined: Sat Feb 10, 2018 9:04 pm

Locked out

Post by astecme2 » Sat Feb 10, 2018 9:09 pm

Hi I have stupidly locked everyon out of the forum. I was trying to force HTTPS but somehaw have managed to set it so that the forum returns https://https://etc. I think I diod this in the server settings portion but cannot see anything anywhere in the database or config file.

Help please

User avatar
janus_zonstraal
Registered User
Posts: 3442
Joined: Sat Aug 30, 2014 1:30 pm

Re: Locked out

Post by janus_zonstraal » Sat Feb 10, 2018 10:07 pm

Look in your database => config table
Sorry! My English is bat ;) !!!

astecme2
Registered User
Posts: 6
Joined: Sat Feb 10, 2018 9:04 pm

Re: Locked out

Post by astecme2 » Sat Feb 10, 2018 10:17 pm

I cannot see any setting that would apply in the database config table.

User avatar
janus_zonstraal
Registered User
Posts: 3442
Joined: Sat Aug 30, 2014 1:30 pm

Re: Locked out

Post by janus_zonstraal » Sat Feb 10, 2018 10:28 pm

Here

Code: Select all

server_name 	
	erver_port 	80 	0
		server_protocol 	https:// 	0
		session_gc
Sorry! My English is bat ;) !!!

sakm
Registered User
Posts: 519
Joined: Sun Jan 21, 2007 8:14 pm
Location: Hull, uk
Name: Stu
Contact:

Re: Locked out

Post by sakm » Sat Feb 10, 2018 10:30 pm

did you change your domain name to include https://

If so you need to remove that

astecme2
Registered User
Posts: 6
Joined: Sat Feb 10, 2018 9:04 pm

Re: Locked out

Post by astecme2 » Sun Feb 11, 2018 7:07 am

Exactly so. But now I cannot get back in to change it.

sotis
Registered User
Posts: 294
Joined: Tue Oct 17, 2006 4:56 pm
Location: Bulgaria
Contact:

Re: Locked out

Post by sotis » Sun Feb 11, 2018 7:18 am

Create cookie.php file with this code, uploud it to the root of your forum and run it with a browser. On the screen you can change Cookie Settings and Server Settings. Clear cache directory, except .htaccess and index.html

Code: Select all

<?php

    /**
    *
    * @package Cookie and script settings tool
    * @copyright (c) 2008 ktuk.net
    * @license GPL
    *
    */

    // Standard definitions/includes
    $page_title = 'phpBB3 Cookies';
	define('IN_PHPBB', true);
	$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
	$phpEx = substr(strrchr(__FILE__, '.'), 1);
	include($phpbb_root_path . 'common.' . $phpEx);

    $cookie_data = array();
    $server_data = array();
    $sent = request_var('sent', '');

    $sql = ' SELECT config_value FROM ' . CONFIG_TABLE . "
    WHERE config_name = 'cookie_domain'";
    $result = $db->sql_query($sql);
    $cookie_data[] = $db->sql_fetchrow($result);
    $db->sql_freeresult($result);

    $sql = ' SELECT config_value FROM ' . CONFIG_TABLE . "
    WHERE config_name = 'cookie_name'";
    $result = $db->sql_query($sql);
    $cookie_data[] = $db->sql_fetchrow($result);
    $db->sql_freeresult($result);

    $sql = ' SELECT config_value FROM ' . CONFIG_TABLE . "
    WHERE config_name = 'cookie_path'";
    $result = $db->sql_query($sql);
    $cookie_data[] = $db->sql_fetchrow($result);
    $db->sql_freeresult($result);

    $sql = ' SELECT config_value FROM ' . CONFIG_TABLE . "
    WHERE config_name = 'cookie_secure'";
    $result = $db->sql_query($sql);
    $cookie_data[] = $db->sql_fetchrow($result);
    $db->sql_freeresult($result);

    $sql = ' SELECT config_value FROM ' . CONFIG_TABLE . "
    WHERE config_name = 'force_server_vars'";
    $result = $db->sql_query($sql);
    $server_data[] = $db->sql_fetchrow($result);
    $db->sql_freeresult($result);

    $sql = ' SELECT config_value FROM ' . CONFIG_TABLE . "
    WHERE config_name = 'script_path'";
    $result = $db->sql_query($sql);
    $server_data[] = $db->sql_fetchrow($result);
    $db->sql_freeresult($result);

    $sql = ' SELECT config_value FROM ' . CONFIG_TABLE . "
    WHERE config_name = 'server_name'";
    $result = $db->sql_query($sql);
    $server_data[] = $db->sql_fetchrow($result);
    $db->sql_freeresult($result);

    $sql = ' SELECT config_value FROM ' . CONFIG_TABLE . "
    WHERE config_name = 'server_port'";
    $result = $db->sql_query($sql);
    $server_data[] = $db->sql_fetchrow($result);
    $db->sql_freeresult($result);

    $sql = ' SELECT config_value FROM ' . CONFIG_TABLE . "
    WHERE config_name = 'server_protocol'";
    $result = $db->sql_query($sql);
    $server_data[] = $db->sql_fetchrow($result);
    $db->sql_freeresult($result);

    $cookie_checked = ($cookie_data[3]['config_value']) ? "checked = \"checked\"" : '';
    $force_checked = ($server_data[0]['config_value']) ? "checked = \"checked\"" : '';

    if (!$sent)
    {
	$request->enable_super_globals();	
    print "<html>
    <head><title>$page_title</title></head>
    <body>
    <form action=\"" . $_SERVER['SCRIPT_NAME'] . "\" method=\"post\"
    <fieldset>
    <table>
    <tr><h2>Cookie Settings</h2></tr>
    <tr><td>Cookie Domain:</td><td><input type=\"text\" name=\"cookie_domain\" value=\"" . $cookie_data[0]['config_value'] . "\"></td></tr>
    <tr><td>Cookie Name:</td><td><input type=\"text\" name=\"cookie_name\" value=\"" . $cookie_data[1]['config_value'] . "\"></td></tr>
    <tr><td>Cookie Path:</td><td><input type=\"text\" name=\"cookie_path\" value=\"" . $cookie_data[2]['config_value'] . "\"></td></tr>
    <tr><td>Cookie Secure:</td><td><input type=\"checkbox\" name=\"cookie_secure\" value=\"1\" $cookie_checked ></td></tr>
    </table>

    <table>
    <tr><h2>Server Settings</h2></tr>
    <tr><td>Force Server Vars:</td><td><input type=\"checkbox\" name=\"force_server_vars\" value=\"1\"  $force_checked ></td></tr>
    <tr><td>Script Path:</td><td><input type=\"text\" name=\"script_path\" value=\"" . $server_data[1]['config_value'] . "\"></td></tr>
    <tr><td>Server Name:</td><td><input type=\"text\" name=\"server_name\" value=\"" . $server_data[2]['config_value'] . "\"></td></tr>
    <tr><td>Server Port:</td><td><input type=\"text\" name=\"server_port\" value=\"" . $server_data[3]['config_value'] . "\"></td></tr>
    <tr><td>Server Protocol:</td><td><input type=\"text\" name=\"server_protocol\" value=\"" . $server_data[4]['config_value'] . "\"></td></tr>
    <tr><td>Submit:</td><td><input type=\"submit\" name=\"sent\" value=\"submit\"></td></tr>
    </table>
    </fieldset>
    </body>
    <html>
    ";
    }

    if ($sent)
    {
       $cookie_domain   =   request_var('cookie_domain', '');
       $cookie_name   =   request_var('cookie_name', '');
       $cookie_path   =   request_var('cookie_path', '');
       $cookie_secure   =   request_var('cookie_secure', 0);
       $force_server_vars   = request_var('force_server_vars', 0);
       $script_path   =   request_var('script_path', '');
       $server_name   =   request_var('server_name', '');
       $server_port   = request_var('server_port', 80);
       $server_protocol   = request_var('server_protocol', 'http://');
       
       $sql = ' UPDATE ' . CONFIG_TABLE . " SET `config_value` = '$cookie_domain' WHERE `config_name` = 'cookie_domain'";
       $db->sql_query($sql);
       $sql = ' UPDATE ' . CONFIG_TABLE . " SET `config_value` = '$cookie_name' WHERE `config_name` = 'cookie_name'";
       $db->sql_query($sql);
       $sql = ' UPDATE ' . CONFIG_TABLE . " SET `config_value` = '$cookie_path' WHERE `config_name` = 'cookie_path'";
       $db->sql_query($sql);
       $sql = ' UPDATE ' . CONFIG_TABLE . " SET `config_value` = '$cookie_secure' WHERE `config_name` = 'cookie_secure'";
       $db->sql_query($sql);
       $sql = ' UPDATE ' . CONFIG_TABLE . " SET `config_value` = '$force_server_vars' WHERE `config_name` = 'force_server_vars'";
       $db->sql_query($sql);
       $sql = ' UPDATE ' . CONFIG_TABLE . " SET `config_value` = '$script_path' WHERE `config_name` = 'script_path'";
       $db->sql_query($sql);
       $sql = ' UPDATE ' . CONFIG_TABLE . " SET `config_value` = '$server_name' WHERE `config_name` = 'server_name'";
       $db->sql_query($sql);
       $sql = ' UPDATE ' . CONFIG_TABLE . " SET `config_value` = '$server_port' WHERE `config_name` = 'server_port'";
       $db->sql_query($sql);
       $sql = ' UPDATE ' . CONFIG_TABLE . " SET `config_value` = '$server_protocol' WHERE `config_name` = 'server_protocol'";
       $db->sql_query($sql);
       
       print "Settings updated!";
       print "<meta http-equiv=\"refresh\" content=\"2;./cookie.php\">";
    }

    ?>

astecme2
Registered User
Posts: 6
Joined: Sat Feb 10, 2018 9:04 pm

Re: Locked out

Post by astecme2 » Sun Feb 11, 2018 9:14 am

sorry still comes up with HTTPs://https://

I cant find where this is set.

User avatar
janus_zonstraal
Registered User
Posts: 3442
Joined: Sat Aug 30, 2014 1:30 pm

Re: Locked out

Post by janus_zonstraal » Sun Feb 11, 2018 9:45 am

Purge the cache folder

Or do a search in the database for "https to give you a idee where to look.
Sorry! My English is bat ;) !!!

astecme2
Registered User
Posts: 6
Joined: Sat Feb 10, 2018 9:04 pm

Re: Locked out

Post by astecme2 » Sun Feb 11, 2018 11:35 am

nothing in the database. I cant purge the cache as cannot log in.

The problem is that I set the site name to https://forum..... need to unset it but cannot find where it is stored,

Thanks everyone for your continued help

User avatar
janus_zonstraal
Registered User
Posts: 3442
Joined: Sat Aug 30, 2014 1:30 pm

Re: Locked out

Post by janus_zonstraal » Sun Feb 11, 2018 11:45 am

Go with your ftp program to the cache folder and delete to two folders inside (installer and production) to purge the cache.

Do you have a link from your board?
Sorry! My English is bat ;) !!!

astecme2
Registered User
Posts: 6
Joined: Sat Feb 10, 2018 9:04 pm

Re: Locked out

Post by astecme2 » Sun Feb 11, 2018 12:13 pm

Many thanks - now fixed by removing the second https from the "not found" web address and going there. Then the board was available so next ACP and did the same then removed the https:// from the server address. - still do not know where it is stored!

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

Re: Locked out

Post by Lumpy Burgertushie » Sun Feb 11, 2018 4:38 pm

go back to the admin panel.

go to the server settings. choose no for force settings.

please post a link to your site so we can test. can't help without a link.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

Post Reply

Return to “[3.2.x] Support Forum”