Page 1 of 1

Best practice for creating test installation

Posted: Mon May 20, 2019 7:06 pm
by Digital Man
I'd like to create a test phpBB installation where I can test upgrades and new styles before applying them to our production board. I'm looking for suggestions on how this is usually done. My highest priority is that I don't want to do anything that could mess up my production board or its database. It would be nice if it was a fairly simple process since I'm new to this, but I'm fairly technical so should be able to do whatever is necessary.

It seems like the options I've seen mentioned so far are:
1) Copy my production board source to a different location on my current server that hosts my production board. I assume I'll need to create a second test database or at least a different table_prefix since I don't want to risk messing up my production database
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.
3) Find a free or cheap second web hosting provider and put my test board there.

My initial task will be to test the update from 3.2.6 to 3.2.7 and then add some new styles, but once I have this test method set up I plan to use it to test any future changes.

Suggestions on the best option for me?

Thanks.

Re: Best practice for creating test installation

Posted: Mon May 20, 2019 7:54 pm
by Lumpy Burgertushie
testing the update is of little value because doing it for real won't be any different because you tested it.

it is usually trouble free as long as you follow the instructions exactly and in order and as long as you use the full package and not the auto update.

you simply replace all the old files with new ones except for the config.php file and the folders listed in the instructions .
then, you run the database update from the folder named install
click on the update tab,
click on update button
click on submit button on the update database only page.
wait,

done.


as for the test board that is a good idea. I would suggest creating the test board on your server.

create a new database,
download the full package from here. install phpbb as normal.

done.
'


robert

Re: Best practice for creating test installation

Posted: Mon May 20, 2019 8:14 pm
by janus_zonstraal
If it is for testing, better make a copy from your live board. (files and database)
Place the files in a other folder "test_board" and link in the config.php to the new database.

Re: Best practice for creating test installation

Posted: Tue May 21, 2019 7:08 am
by AmigoJack
  1. Either a different table prefix or database.
  2. That's pretty perfect for a test system, as you can freely choose which versions of the softwares to use (MariaDB, PHP, Apache...). It sounds like you never tried this before: you don't need a separate computer - you can easily every. Have a read at https://www.apachefriends.org/
  3. No, too many things can be different and limiting. If, at all, use the same hoster you currently have.

Re: Best practice for creating test installation

Posted: Thu May 23, 2019 1:41 am
by Lady_G
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.