bjorn / rpgdx

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

Call to undefined function set_magic_quotes_runtime() #4

Closed bjorn closed 3 months ago

bjorn commented 5 years ago

Currently rpgdx.net is unavailable due to the following error:

Fatal error: Uncaught Error: Call to undefined function set_magic_quotes_runtime() in /home/public/forums/common.php:29 Stack trace: #0 /home/public/forums/index.php(26): include() #1 {main} thrown in /home/public/forums/common.php on line 29

It appears to be caused by an upgrade to PHP on the server, where the set_magic_quotes_runtime function was removed, after it had been deprecated for a while.

Unfortunately, finding out to what extend RPGDX relied on this feature and where adjustments are necessary is going to take quite a bit of effort. In addition, until such an effort has been undertaken the site is at risk of getting hacked.

With activity being at record low anyway, it's probably best to bring this site back in read-only mode.

Poikilos commented 4 months ago

I found this repo now and I see that you have recorded this issue, so ignore the earlier e-mail. I will work on this in my fork, and try accounting for the change

According to wayback machine the error occurred at least as early as February 29, before you posted this, so that may account for some falloff in traffic though I understand many of the games use QBasic or DOS in general. However, note that QB64 and PC-BASIC (GW-BASIC interpreter for Python) are an excellent modern BASIC interpreters and still maintained. If the RPGDX programs remain accessible, people using these can enjoy the RPGDX games as some run in an interpreter (are either not compiled or include the sources). Also with all the languages and even deprecations within frameworks or dependencies (Cargo, npm, NuGet, etc.), maybe I shouldn't be surprised to hear people online saying they want to learn "old-school" development. Of course, you could also add newer news to the site.

Poikilos commented 4 months ago

Can you tell me what PHP version I should target? I could go with 8.2 but I don't want to go beyond what you have available on your host OS (though you could install sury repo if using a VPS rather than shared hosting).

bjorn commented 4 months ago
  • I'll also try making a read-only setting.

Just note that first of all, read-only mode would be for security purposes and I mostly just meant setting the SQL permissions to read-only. This might just need a few changes here and there to handle database writing errors more gracefully, though displaying raw errors is also fine in response to any attempted posting or editing.

Can you tell me what PHP version I should target?

PHP versions 8.0 to 8.2 are available in stable environments on the host. I would indeed suggest to target 8.2.

The SQL database is currently MariaDB 5.3 with InnoDB disabled. If it's helpful I could look into updating this to MariaDB 10 (with InnoDB enabled).

According to wayback machine the error occurred at least as early as February 29, before you posted this, so that may account for some falloff in traffic though I understand many of the games use QBasic or DOS in general.

The error accounts for the traffic going to complete 0, but the falloff was unfortunately happening since years before. I think it was mostly due to the growth of social media platforms. Even if I don't expect RPGDX to become popular again, I do think it's worth keeping it online as public archive.

image Monthly sessions (site started 2003 but GA wasn't installed until 2006)

Poikilos commented 4 months ago

I looked over the diff between phpBB 2.0.23 and rpgdx/forums. I don't fully understand some of the hacks yet but I can tell that porting them over would take time. For now, it will be easier to fix deprecated calls within your fork of phpBB 2.0.23 and I'm confident I can do that faster. Before I diverge too much from 2.0.23, I have included a patch that represents only the changes. I removed some changes to whitespace, documentation, etc. so that it clearly represents only customizations. This patch would be useful if it is decided that we use a later version and need to port these changes (For now the readonly mode and fixes to deprecated calls seems like the best way to go, and upgrading could be done later but unlikely) rpgdx-forums-vs-2.0.23.patch.zip

Poikilos commented 4 months ago

I found php-mysql-shim and php-ereg-shim so there will be far fewer changes necessary.

bjorn commented 3 months ago

Fixed by #9. Thanks @Poikilos!