phpBB: localhost redirects to my live site

To test on localhost with an existing database, you must also change the database table ‘config’.

config_name         config_value (from)       config_value (to)
"cookie_domain";    "example.com"             "localhost url"
"server_name";      "www.example.com"         "localhost url"
"server_protocol"   "https://"                "http://"
"site_home_url"     "https://www.example.com/" "http://localhost url/"
"script_path"       "/"                        "/"

Also need to change the config.php from root.

<?php
// phpBB 3.0.x auto-generated configuration file
// Do not change anything in this file!
$dbms = 'mysql';
$dbhost = 'localhost';
$dbport = '';
$dbname = 'REMOVED';
$dbuser = 'REMOVED';
$dbpasswd = 'REMOVED';
$table_prefix = 'phpbb_';
$acm_type = 'file';
$load_extensions = '';

@define('PHPBB_INSTALLED', true);
@define('DEBUG', true);
@define('DEBUG_EXTRA', true);
?>
Advertisements

How to install Composer on MacOS

There is some ways to install it. I will describe the way with Brew.

If you don’t have a brew, let’s do the followings…

It’s very easy to install brew. You have to run only your terminal and paste this code:

Step1 Install brew:

/usr/bin/ruby \
-e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

What does that code do here ?
1. Get script from https://raw.githubusercontent.com/Homebrew/install/master/install
2. Do it by using ruby

Step2 Install Composer:

brew install composer

Step3 check the version:

composer –version

Ref Link:

https://pilsniak.com/install-composer-mac-os/