Porting phpBB to the Internet Computer

Hi everyone!

I am trying to figure out if it’s possible to port an already existing phpBB forum with users and data spanning several years to the Internet Computer. The idea of a truly decentralized system for hosting your own web content on a blockchain fully on-chain is very exciting to me, and I’d like to take advantage of this technology to host content on phpBB forums on the Internet Computer. The problem is… I don’t think this is possible without a ton of extra work needed to be done to make the port possible, and even then it just might not be technically possible to do this. I’m having trouble accessing how difficult a task this would actually be to take on because… well I’m out of my depth frankly, but I think I understand enough of the basics to understand how to begin tackling this, or to understand where the potential problem areas with working on this would be.

There are a couple of different reasons why I think I would be unable to do this without having to develop new software to help with the porting process.

Since I don’t just want to take a new instance of phpBB and figure out how to make it run on the Internet Computer this makes the task harder. From what I understand, mySQL isn’t able to be run on the Internet Computer directly currently. However, I did notice that there is a solution for running SQLite on the Internet Computer talked about here: Sqlite backed by stable memory: the perfect match?. I’m not a database admin or database programmer by trade, but isn’t a lot easier to convert data from mySQL to SQLite then it would be to convert to another NoSQL or data storage solutions designed for the Internet Computer like CANDB (forum post about the technology here: CanDB, the first scalable NoSQL Database on the Internet Computer)? I’d also have to update the methods used to store data on the system too assuming that I end up using a different database/data storage solution, which would be something else that would have to be developed.

Another problem is that I’m not totally sure that the phpBB software package is something that could be bundled into a canister on the Internet Computer. I would guess that the answer to this question is no. Even if the software is directly able to be pushed to the Internet Computer as an EXE or TAR file and is extracted it wouldn’t be able to run as an EXE or TAR file because it isn’t being deployed to a Linux or Windows system. You also wouldn’t be able to install the individual software packages that need to be run as a service in order for phpBB to work in full either. At least, that’s my understanding of it. Is that correct?

Assuming that I’m unable to deploy the software to make phpBB run, but I’m able to migrate the data to a database/data storage system that is able to work on the Internet Computer it’s possible that I could use other systems to function as the forum GUI, but I haven’t found any except for one recommended to be by a member of the Dfinity dev Discord that’s styled after 4chan: https://devpost.com/software/seachan. There’s a live instance of it being hosted here: https://sfjch-siaaa-aaaak-qarnq-cai.ic0.app/. While this forum does appear to be fully functional… it’s not very good-looking and I’d rather not use it as an alternative GUI if possible. Does anyone else know of any other forums or forum-like systems that have successfully been ported to the Internet Computer that I could maybe take inspiration from or build on top of?

1 Like

Welcome to the forum; it’s the best there is! :joy:

Necessity is the mother of invention, so if you can create something better I wish you best of luck :pray:

Unfortunately I cannot help you, with your questions.

But if you stick around for a little longer someone would answer your questions.

Also I’d be glad to use your product once it’s developed,

Don’t lose focus, stay sharp and keep chasing your goals :dizzy:

1 Like

Sounds right to me. You only get a WASM runtime out of the box, and from there you have to build/install your own translation layers.

From the phpBB docs: phpBB is written in PHP and requires the PHP runtime engine to be installed and properly configured on the server phpBB is run on.

I do not know of a WASM-based PHP runtime, so I think getting phpBB to run on the IC is a very big undertaking.

Not me, but I’d love to see some suggestions…

This has been asked a few times. Maybe after kybra @lastmjs can work on PHP :slight_smile:

The quickest route to doing this without creating a PHP VM(which might require a lot of rework of any indexing functions due to processing limit in rounds) would be to analyze the data schema and duplicate the functionality and then port the messages into that structure. Perhaps you could just pump them into something like dscvr(cc @rckprtr) or distive(cc @simdi.jinkins). The trick would be allowing users to claim their user accounts to a particular principal…since those platforms likely use principals as a user key(actually this might not be the most efficient and I don’t want to make assumptions) you might want to look at creating principals for each name and then doing delegations.

All of that to say, unfortunately, it isn’t plug and play at this point.

Note: this looks promising, but it may not play well with things that have their own datasources like SQL DBs: GitHub - php-rust-tools/parser: A handwritten fault-tolerant, recursive-descent parser for PHP written in Rust.

1 Like

Thanks for the welcome, input, and encouragement! I’m glad this forum exists because without it figuring out these types of things would be a lot more difficult.

That’s what I was afraid of. It sounds like I’d basically be starting from zero. And not only would it be starting from zero just to get PHP itself to work on the Internet Computer, I’d then have to deal with a migration of years of data on top of that, which presents it’s own difficulties.

That’s what I figured about about the data. I haven’t tried DSCVR or Distive yet. I will take a look at those and see how they compare to phpBB. I also figured that dealing with the differences between user accounts and principals would be something that would need to be tackled as well for dApps that are already built on the Internet Computer.

I’ll take a look at that Github repo, and see if that’s something that can be helpful. I’m not familiar with Rust however, so it would take a while for it to be something that I could meaningfully make sense of unfortunately.

I think a more realistic path would be for someone to create a service like phpBB on the IC that can take data exported from phpBB and import it to configure everything as it was.

PHP is best,phpBB on the IC