bjorn / rpgdx

RPGDX
http://rpgdx.net
2 stars 3 forks source link

rpgdx website

The rpgdx website is a mildly customized fork of phpBB 2.0.23 with:

Why phpBB 2 not 3?

The customizations to 2 are not yet fully ported to 3. There is a clear and relatively safe upgrade path from 2 to 3.3 usually, but due to our custom table names and other customizations:

Due to the time requirement for porting to 3 and the site becoming more or less archival, further patching a readonly instance of the phpBB 2 version is considered as a safe hosting option. Maintaining the 2.0.23-based code is acceptable since 2.0.23 is the last version of 2.x.

If anyone wants to port RPGDX to phpBB 3.3, feel free!

System Requirements

Shims for phpBB 2 on PHP 8.x

These reqirements are technically not new but must be done (as of May 2024 php8 branch) since the server was already upgraded to php 8.x.

These shims only apply to using phpBB 2 (or other old PHP code) under PHP 8.x or later, which has removed some functions that were deprecated in earlier versions.

REPOS=/opt/git`
# ^ if using managed hosting, change this to `REPOS=$HOME/git`
mkdir $REPOS
cd $REPOS || echo "Don't do the rest if you see this error!"
git clone https://github.com/Hierosoft/php-ereg-shim-procedural.git
git clone https://gitlab.com/poikilos/mysql-shim.git
git switch php8
# ^ If git switch php8 fails, the pull request may be complete at the upstream repo:
#   https://gitlab.com/dotpointer/mysql-shim.git
#   In which case the branch would no longer be necessary and the default branch can be used at the upstream repo
#   (no git switch would be necessary, but use the upstream address instead).
#   See [Do not send NULL to mysql error functions (prevent PHP 8.2 crash when there is no link).](https://gitlab.com/dotpointer/mysql-shim/-/merge_requests/1)
git clone https://github.com/ChristiaanBye/polyfill-each.git

These shims can be prepended to every php file automatically. This is necessary so that all php files in phpBB 2 (and other PHP files with old calls) have access to the old functions. To do so, follow either the VPS or managed hosting instructions below. Then do the "Install phpBB" section and anything below that.

VPS instructions

If your are using a VPS (or similar setup such as a dedicated server), run these two commands (again, only works/necessary if using PHP 8.0 or higher):

# First make sure you've set the REPOS folder appropriately
#   as described in earlier steps.
# There can only be one auto_prepend_file, so make a loader first:
echo '<?php' | tee $REPOS/php8-shims.php
echo "require '$REPOS/mysql-shim/mysql-shim.php';" | tee -a $REPOS/php8-shims.php
echo "require '$REPOS/php-ereg-shim-procedural/php-ereg-shim-procedural.php';" | tee -a $REPOS/php8-shims.php
echo "require '$REPOS/polyfill-each/polyfill-each.php';" | tee -a $REPOS/php8-shims.php
echo '?>' | tee -a $REPOS/php8-shims.php

example $REPOS/php8-shims.php (generated by commands above if REPOS is /opt/git):

<?php
require '/opt/git/mysql-shim/mysql-shim.php';
require '/opt/git/php-ereg-shim-procedural/php-ereg-shim-procedural.php';
require '/opt/git/polyfill-each/polyfill-each.php';
?>

Load the shims file every time php runs:

echo "auto_prepend_file=$REPOS/php8-shims.php" | sudo tee /etc/php.d/95-php8-shims.ini

User-space http daemon instructions:

Managed Web Hosting Instructions

If using managed web hosting (not a VPS)

Install phpBB

Only if installing on a fresh server, you will have to install phpBB and in config.php, so only in that case you would set the following to false:

define('PHPBB_INSTALLED', false);

Set up the custom tables for rpgdx (reminder: This is a fork of phpBB, so both new custom code and customized files in forums folder may require these tables):

mysql -u username -p indierp_main < sql/database.sql

In a general sense, the steps below work on a typical setup, but reading the official install documentation is advisable: forums/docs/INSTALL.html (If you've completed all steps above on a local offline instance, try http://localhost/forums/docs/INSTALL.html).

Go to your server web address, followed by the install file, such as: http://localhost/forums/install/install.php

The install process will create database tables (or fail if any of them exist), so again, this should only be done on a fresh install.

If you are not on a fresh server, the "install" folder will have to be removed when instructed by the forum software at the http://localhost/forums address or web address (it will tell you to remove the install folder if you have completed setup installed a config.php where PHPBB_INSTALLED is true into the forums folder).

See also:

Debug setup

For an insecure local configuration for debugging (may help with setup details in general especially on rpm-based distros) see development.md