Make the pbpBB update process faster and easier

https://www.phpbb.com/ideas/
Author:
xtellox
Posted:
Thu Mar 22, 2018 1:26 am
Rating:
Status:
New
Ideas Bot
Registered User
Posts: 425
Joined: Sat Oct 13, 2012 10:06 am

Make the pbpBB update process faster and easier

Post by Ideas Bot » Thu Mar 22, 2018 1:26 am

Hello,

Each time I upgrade phpBB (using the "Automatic Update Package"), I have to find the right archive from phpbb.com, download it, then unzip it, rename the extracted "install" dir to "_install" (so that the board doesn't go offline during the upload), then upload "_install/" and "_vendor/" folders which contain ~3,000 small files (total of ~20MB) which takes ~30min, then finally actually start the update... Am I the only one finding this painful? Am I missing something?

I whish the board can provide a button in the ACP to download the right update package (after all, the board knows which version you are running, and the last version available right?). It could download the package itself to any dir on the web server, or at least provide the direct download link. And in the case phpBB cannot download the update package itself, we should be able to upload the whole package to start the update process, it would be way faster to upload a single file (~6MB) rather than 3,000 small files for a total of ~20MB. For what I know, phpBB can easily unzip the package and let you know when it's ready.

Thanks for your feedback!

xtellox
Registered User
Posts: 7
Joined: Thu Mar 22, 2018 1:05 am

Re: Make the pbpBB update process faster and easier

Post by xtellox » Thu Mar 22, 2018 1:34 am

Funny enough, I just saw that 2 months ago, phpBB 3.2.2 packages were compromised... (viewtopic.php?f=14&t=2456896). That's another example of a possible benefit from my idea: if phpBB can download the update package itself, no more compromised package anymore (it would just have to check its SHA256 cheksum), whether it's because of malicious action or because of transfer issue!

User avatar
Lumpy Burgertushie
Registered User
Posts: 64585
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Make the pbpBB update process faster and easier

Post by Lumpy Burgertushie » Thu Mar 22, 2018 1:42 am

I believe they are working on something like that for 3.3
however, you should not have been using the auto update package since 3.1 came out. that is unless for some reason you are making edits to the core code.

the proper way to update /upgrade since 3.1 came out is a file replacement:
https://www.phpbb.com/support/docs/en/3 ... upgrade31/

that is pretty fast depending on your internet speed.
you download. unzip, upload and run the database update only and you are done.


robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

xtellox
Registered User
Posts: 7
Joined: Thu Mar 22, 2018 1:05 am

Re: Make the pbpBB update process faster and easier

Post by xtellox » Thu Mar 22, 2018 2:05 am

I upgraded from 3.2.1 to 3.2.2 by following the procedure described in the ACP "System" tab, which is actually pretty close to the procedure you linked in your message.
I don't really understand when you say "it is a file replacement", "you download. unzip, upload and run the database update only and you are done". I've just completed my upgrade to 3.2.2, it took me around 45 minutes in total (30 minutes just to upload the unzipped package). I'm just saying: we could save 30 minutes out of the 45 minutes if we wouldn't have to upload all these files. And I would consider my internet connection pretty good. And even if my connection (or my web host) is not really fast, what I suggested would still be faster, easier, and more reliable ;)

Thanks,
Xavier

User avatar
warmweer
Registered User
Posts: 974
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: Make the pbpBB update process faster and easier

Post by warmweer » Thu Mar 22, 2018 8:37 am

(after all, the board knows which version you are running, and the last version available right?)
No it doesn't, it just blindly accepts some info in a few lines in a field or file.
It's the admin who knows (should know) exactly which version and whether there have been file or database changes, and the said admin should act accordingly.
BTW automatically downloaded the zip to the host and then automatically unpacking takes a lot more time than donwloading the package, unzipping it on your PC and uploading the files.
A bug is a feature that hasn't made it to the manual (yet)

User avatar
P_I
Registered User
Posts: 838
Joined: Tue Mar 01, 2011 8:35 pm
Location: Calgary
Contact:

Re: Make the pbpBB update process faster and easier

Post by P_I » Thu Mar 22, 2018 1:14 pm

I don't know the current status of the effort, but it has been previously discussed in PHPBB3-14518 One click update - proposal for 3.3 - Development Discussion Board.
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams

User avatar
Lumpy Burgertushie
Registered User
Posts: 64585
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Make the pbpBB update process faster and easier

Post by Lumpy Burgertushie » Thu Mar 22, 2018 2:23 pm

xtellox wrote:
Thu Mar 22, 2018 2:05 am
I upgraded from 3.2.1 to 3.2.2 by following the procedure described in the ACP "System" tab, which is actually pretty close to the procedure you linked in your message.
I don't really understand when you say "it is a file replacement", "you download. unzip, upload and run the database update only and you are done". I've just completed my upgrade to 3.2.2, it took me around 45 minutes in total (30 minutes just to upload the unzipped package). I'm just saying: we could save 30 minutes out of the 45 minutes if we wouldn't have to upload all these files. And I would consider my internet connection pretty good. And even if my connection (or my web host) is not really fast, what I suggested would still be faster, easier, and more reliable ;)

Thanks,
Xavier
actually the procedure in the system tab is nothing like what I described. If you check my post I gave a link to the "file replacement" method that I was talking about.
the auto update requires that a lot of files have to be edited and checked etc. then downloaded back to your computer, then uploaded back to the server, etc. etc.

the file replacement requires none of that.


luck,
robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

xtellox
Registered User
Posts: 7
Joined: Thu Mar 22, 2018 1:05 am

Re: Make the pbpBB update process faster and easier

Post by xtellox » Fri Mar 23, 2018 1:45 am

Thanks for your answers. To be more precise, I used the "Automatic Update Package" (and not simply replaced all the files) because I have a few things I've modified in the code. So yes, in this case there are actually to "phases" where you have to upload some files:
  • one time before even starting the actual Update process (uploading the complete "install"+"vendor" dirs)
  • one time after the "file compare" process to produce the new merged code
I personally don't mind the second one because since I upgrade frequently, I don't have too many files to upload, it's usually faster than the first upload phase (yet I'm not sure why I need to download files from a web server, to re-upload them to the same web server, but I guess it could be tricky for a PHP script to write in its own scripts dir?... write permission issues? concurrency issues?).

Xavier

User avatar
Lumpy Burgertushie
Registered User
Posts: 64585
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Make the pbpBB update process faster and easier

Post by Lumpy Burgertushie » Fri Mar 23, 2018 1:47 am

curious, what files are you editing the code in? there may be a better way to get what you want.
and yes, if you are editing core files then that is what the autoupdate is for.


robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

xtellox
Registered User
Posts: 7
Joined: Thu Mar 22, 2018 1:05 am

Re: Make the pbpBB update process faster and easier

Post by xtellox » Fri Mar 23, 2018 2:07 am

warmweer wrote:
Thu Mar 22, 2018 8:37 am
(after all, the board knows which version you are running, and the last version available right?)
No it doesn't, it just blindly accepts some info in a few lines in a field or file.
It's the admin who knows (should know) exactly which version and whether there have been file or database changes, and the said admin should act accordingly.
Oh really? Could you then explain me this:
Image

Look, I'm using the "Automatic Update Package" because I have a few things I've modified in the code, and the Update process is smart enough to detect these changes, then merge them with the new code! So, again, it would be technically feasible (and maybe not that hard) to improve the Update process so that it downloads the right package (in this case, "phpBB-3.2.1_to_3.2.2.zip") then unzip it in a temp dir, and start the code analyzing. I'm not saying this just because it would just be easier for me, I'm taking some of my time to contribute to your community, and I think I know what I'm talking about (IT professional having built web sites and back-end stuff for the last past 20 years). Look around you, the software is getting smarter and smarter, more and more software are updating themselves automatically, handling conflicts and making sure it's seemless to the users (and yes, even to power users / admins). Look at your OS, your phone, your router, your chrome cast, all your apps. Soon we won't have to manually download any updates I think... it's 2018...
warmweer wrote:
Thu Mar 22, 2018 8:37 am
BTW automatically downloaded the zip to the host and then automatically unpacking takes a lot more time than donwloading the package, unzipping it on your PC and uploading the files.
Are you telling me that this:
  1. PHP code downloading a 6 MB ZIP file
  2. PHP code unzipping this file
is taking "a lot more time" than this:
  1. Manually finding the right download package
  2. Manually downloading the 6 MB ZIP package file
  3. Manually unzipping file to local temp dir
  4. Manually uploading the resulting 20MB / 3,000 files to your server
Am I missing something? (as I said in my previous post, I was talking about the time it takes for the first "phase" of uploads, the one before the Update process starts)
Last edited by xtellox on Fri Mar 23, 2018 2:20 am, edited 1 time in total.

xtellox
Registered User
Posts: 7
Joined: Thu Mar 22, 2018 1:05 am

Re: Make the pbpBB update process faster and easier

Post by xtellox » Fri Mar 23, 2018 2:18 am

Lumpy Burgertushie wrote:
Fri Mar 23, 2018 1:47 am
curious, what files are you editing the code in? there may be a better way to get what you want.
and yes, if you are editing core files then that is what the autoupdate is for.

robert
I modified mainly "includes/functions_posting.php" so that I can get custom e-mail notifications every time something is posted. I only have a very small amount of messages (2 or 3 per months) but I want to be able to reply to them ASAP... so there's no way I will manually check everyday for new posts. I tried a few things in the past (like subscribing to all I can), and other tricks/plugins a long time ago, and then I gave up, so for the last 5 years, I've used this hack I've made myself and it's exactly what I need. Yet, it's been a while since I've looked for a more "native" way to do it, so if you have a better idea, I would be glad to hear it :)

Thanks,
Xavier

User avatar
Lumpy Burgertushie
Registered User
Posts: 64585
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Make the pbpBB update process faster and easier

Post by Lumpy Burgertushie » Fri Mar 23, 2018 3:14 am

have you looked at this:
viewtopic.php?f=456&t=2354426

robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

User avatar
JoshyPHP
Code Contributor
Posts: 944
Joined: Mon Jul 11, 2011 12:28 am

Re: Make the pbpBB update process faster and easier

Post by JoshyPHP » Fri Mar 23, 2018 12:53 pm

xtellox wrote:
Fri Mar 23, 2018 2:07 am
I think I know what I'm talking about (IT professional having built web sites and back-end stuff for the last past 20 years)
Have you considered using your vast experience to implement this feature yourself?

https://wiki.phpbb.com/Get_Involved#Cre ... ng_Patches
I wrote the thing that does BBCodes in 3.2.

xtellox
Registered User
Posts: 7
Joined: Thu Mar 22, 2018 1:05 am

Re: Make the pbpBB update process faster and easier

Post by xtellox » Mon Mar 26, 2018 2:15 am

Lumpy Burgertushie wrote:
Fri Mar 23, 2018 3:14 am
have you looked at this:
viewtopic.php?f=456&t=2354426

robert
Nope. I'll have a look, thanks! :)

xtellox
Registered User
Posts: 7
Joined: Thu Mar 22, 2018 1:05 am

Re: Make the pbpBB update process faster and easier

Post by xtellox » Mon Mar 26, 2018 2:20 am

JoshyPHP wrote:
Fri Mar 23, 2018 12:53 pm
xtellox wrote:
Fri Mar 23, 2018 2:07 am
I think I know what I'm talking about (IT professional having built web sites and back-end stuff for the last past 20 years)
Have you considered using your vast experience to implement this feature yourself?
https://wiki.phpbb.com/Get_Involved#Cre ... ng_Patches
Sadly, I don't have enough time for that (I already have many projects), but I wish I could so that I could give back to this community (I have been using phpBB for about 10 years!). Thanks for your suggestion though :)

Post Reply

Return to “phpBB Ideas”

Who is online

Users browsing this forum: No registered users and 5 guests