Improving the PHPBB update process

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Anti-Spam Guide
Post Reply
Friendly
Registered User
Posts: 66
Joined: Tue May 06, 2008 12:21 pm

Improving the PHPBB update process

Post by Friendly »

I installed a PHPBB3 board about two years ago, as a temporary board to use amongst some friends. After installing it, I spent the last couple of years working on Drupal. Drupal has a forum module that ships with core, but the forum module is far inferior to PHPBB. But that's not really what my post is about.

While working with Drupal for the last few years, I have had to do regular updates, both of modules, and of the core. With Drupal core, all that needs to be done is for all the core files to be over-written with the new core files, and a database update script is run that makes any necessary changes to the database. The process rarely takes more than five minutes, and is quite easy.

I came back to my PHPBB forum the other day to do an update - I was still running 3.0.2, and I upgraded to the latest version.

I was somewhat dismayed by the complexity of the update situation. The problem is that I installed a bunch of mods onto my site back when I was first setting it up. I wasn't the creator of the mods, and I don't know how PHPBB is put together very well from a programmers end. During the update process, I had to go through and examine the differences in files with conflicts, choosing whether to merge, not merge etc, which block of code to keep. For some of these, the decision was easy, for others, it was harder, as I didn't know what the code in question was supposed to be doing.

The problem here is that to add modules, the core files had to be modified. And to do an update, the core files have to be over-written. Obviously there is a conflict here.

Drupal on the other hand not only doesn't require core file modification, they STRONGLY discourage it, in order to prevent this exact problem. They have done this by setting up a system of hooks that call functions in external files at certain points throughout the page rendering process. If a function in an external module is named according to the hook naming convention, it will automatically be called, running whatever code is defined in the function.

As a result, core files are never touched, and as I mentioned at the start of this post, update is as simple as over-writing the current core files on the server. Using a command line interface, I can do this in about 20 seconds, plus another minute or so to run the update script that makes any necessary database changes.

I feel that changing PHPBB either to a similar process, or using some other process that allows for modifications without changing core code, would make PHPBB a much stabler, and much more secure process. It would be more stable, because modules could be added without having to change existing code, meaning that there would be less chances for mistakes to be made when adding modifications (as it stands now, I have a few locations on my site that appear as {some text} instead of the text that variable is supposed to represent - I have no idea how/where to fix this). And it would be made more secure, because people who aren't as skilled would be more likely to keep up to date with updates. As it stands now, it can be quite daunting, not knowing which files should be merged, and which code should be selected for the merge.

I write this post not as a 'Drupal is the best, PHPBB sucks' type post. Rather, it's more of a suggestion and request to the PHPBB developers, in order to make PHPBB the best piece of software it can be. Thank you.
User avatar
onehundredandtwo
Registered User
Posts: 1228
Joined: Fri Nov 14, 2008 8:07 am

Re: Improving the PHPBB update process

Post by onehundredandtwo »

I completely agree with you on this.

phpBB4 will most likely have support for components (aka plugins) which will make the update process a lot easier. See MODS -> plugins/add-ons/extensions and phpBB4 Architecture for more info.

There were also a number of improvements sometime (I think it was 3.0.6) which reduced the number of conflicts.
Need help preventing spam? Read Preventing spam in phpBB 3.0.6 and above
Friendly
Registered User
Posts: 66
Joined: Tue May 06, 2008 12:21 pm

Re: Improving the PHPBB update process

Post by Friendly »

Oh! I'm glad to hear that this is already in the works. I'm a little embarrassed about being behind the times on this to tell the truth! Thanks for the links.
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Improving the PHPBB update process

Post by igorw »

There is a more advanced hooks architecture planned for phpBB 3.1: http://area51.phpbb.com/phpBB/viewtopic ... 84&t=32805
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
Son of a Beach
Registered User
Posts: 294
Joined: Fri Sep 07, 2007 1:36 am
Location: Tasmania
Contact:

Re: Improving the PHPBB update process

Post by Son of a Beach »

The problem with phpBB 'MODs' is that they are "MODifications" and not "MODules". This is a common and unfortunate misunderstanding.

I'm looking forward to this being improved in a future version too!
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: Improving the PHPBB update process

Post by Pony99CA »

Just for balance, the disadvantage of hooks is that you can only change things that the programmer anticipated people might want to change and therefore provided a hook for it. phpBB MODs, while more painful to update, do give programmers much more flexibility in getting the board to work the way that they want it to work.

Also, hooks aren't necessarily immune from breaking after an update. If a new feature requires changing the hook API for some reason, all existing hooks might break. (There are ways to try to accomplish backward compatibility, but sometimes a clean break might be needed.)

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.
Friendly
Registered User
Posts: 66
Joined: Tue May 06, 2008 12:21 pm

Re: Improving the PHPBB update process

Post by Friendly »

I agree that hooks need to be thought about ahead of time or some might be missed, but over time (and new versions of the software) missing hooks can be filled in.

One nice thing about Drupal is that they also give module developers the ability to add their own hooks. So for example, the ubercart e-commerce module has hooks built into it that aren't part of Drupal core. This is good because it makes this module extendable.
Post Reply

Return to “phpBB Discussion”

cron