Digital Man wrote: ↑
Mon May 20, 2019 7:06 pm
2) Build up a local system and set it up as a local webserver. I do have an unused Ubuntu PC I may be able to use for this.
This is the option I use. My computer is configured as a 'localhost' server. I'm completely able to use this PC for both personal use and server testing.
You should to match computer's OS to your production server as closely as possible in order to be able to debug configuration problems. If you have Ubuntu, then the production server should be using a version based on debian (.deb packages). I'm using Fedora Linux because my production server is based on Red Hat (.rpm packages).
Next, obtain a recent snapshot of the production database. You will need to modify the database configuration to operate as 'localhost'. Here are the postgreSQL commands (from psql).
Code: Select all
# SELECT * from config WHERE config_name = 'cookie_domain';
# UPDATE config SET config_value = 'localhost' WHERE config_name = 'cookie_domain';
# SELECT * from config WHERE config_name = 'cookie_name';
# UPDATE config SET config_value = 'phpbb3_localhost' WHERE config_name = 'cookie_name';
# SELECT * from config WHERE config_name = 'server_name';
# UPDATE config SET config_value = 'localhost' WHERE config_name = 'server_name';
If your server is https://, you should have a self-signed SSL certificate on localhost to also be https://. Otherwise, make this additional database change:
Code: Select all
# SELECT * from config WHERE config_name = 'server_protocol';
# UPDATE config SET config_value = 'http://' WHERE config_name = 'server_protocol';
Restart your localhost server (apache) to reload the database.
Once everything is in place, create a text file which documents every step you've taken to restore your production database into localhost. Also, every modification from the 'stock' files.
These modified files then become the master copy for your production server. Upload and install the files according to the phpBB instructions.
'localhost' has no activity from other users or network traffic. It is very easy to trace errors in the server log. I can force errors, then see the result in real time.
Localhost testing also allows me to modify the server configuration without regard to other users. If I want to restart apache or modify my PHP installation, I simply do so.