Update from phpBB 3.2.2 to 3.2.3 - database does not go offline

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
Lady_G
Registered User
Posts: 272
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Update from phpBB 3.2.2 to 3.2.3 - database does not go offline

Post by Lady_G »

Support Request Template
What version of phpBB are you using? phpBB 3.2.3
What is your board's URL? https://localhost
Who do you host your board with? none
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Update from a previous version of phpBB3
Is registration required to reproduce this issue? No
Do you have any MODs installed? No
Do you have any extensions installed? Yes
What version of phpBB3 did you update from? phpBB 3.2.2
What extensions do you have installed? No answer given
What styles do you currently have installed? No answer given
What language(s) is your board currently using? No answer given
Which database type/version are you using? PostgreSQL
What is your level of experience? Comfortable with PHP and phpBB
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? Install (copy) files from the phpBB 3.2.2 to 3.2.3 automatic update package to the phpBB directory. No further actions.
Please describe your problem. I'm updating from 3.2.2 to 3.2.3 using the Automatic update package procedure via command line.

Downloaded: phpBB-3.2.2_to_3.2.3.tar.bz2
Environment: localhost (testing)
OS: Linux (Fedora 28)
Database: PostgreSQL 10.5
PHP version: 7.1.17

The forum does not go offline automatically. The database is not locked, I can edit normally.The ACP is correctly displaying a warning:
Warning

Please delete, move or rename the install directory before you use your board. If this directory is still present, only the Administration Control Panel (ACP) will be accessible.
I take my site offline during the update process, so this will not block my upgrade.

Has the behavior changed, or, is this a bug?
Generated by SRT Generator
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28616
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: Update from phpBB 3.2.2 to 3.2.3 - database does not go offline

Post by Paul »

As admin you don't see that message. You will need to logout to see it
User avatar
P_I
Community Team Member
Community Team Member
Posts: 2344
Joined: Tue Mar 01, 2011 8:35 pm
Location: Western Canada 🇨🇦
Contact:

Re: Update from phpBB 3.2.2 to 3.2.3 - database does not go offline

Post by P_I »

Lady_G wrote: Sun Sep 16, 2018 4:55 pm The forum does not go offline automatically.
When updating there is also a setting in ACP->Board settings that can be used to disable the board for end-users, look for

Disable board:
This will make the board unavailable to users who are neither administrators nor moderators. You can also enter a short (255 character) message to display if you wish.

Set it to Yes while you update and provide a message for your users along the lines of "Back soon. Maintenance in progress, your patience is appreciated"

I always double check using another browser and a non-logged in (i.e. guest) user.

Once the update is completed and you are satisfied that everything is okay, set Disable board back to No.
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: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Update from phpBB 3.2.2 to 3.2.3 - database does not go offline

Post by Lumpy Burgertushie »

the problem with setting that message to users is that when you are using the proper update method of file replacement, that message will not show up while you are deleting the old files and uploading the new ones etc.

once you have finished the file replacement the database update only takes a couple of minutes.

point being that it is really a waste of time to worry about all that.

luck,
robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
Lady_G
Registered User
Posts: 272
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: Update from phpBB 3.2.2 to 3.2.3 - database does not go offline

Post by Lady_G »

Paul wrote: Sun Sep 16, 2018 5:16 pm As admin you don't see that message. You will need to logout to see it
I have logged out, changed browsers, and used a separate test account. There is no change in the database behavior - it is not locked for writing. I can edit and update posts as normal.

When I rename the install/ directory to something else, the ACP no longer displays the warning - which is correct.

My database is postgreSQL. Is there anything different between MySQL and postgreSQL that the updater manages?
Lumpy Burgertushie wrote: Sun Sep 16, 2018 5:41 pm point being that it is really a waste of time to worry about all that.
I agree, as there will be no updates during my upgrade. However, someone who updates without taking the site offline is risking a possible database corruption. In a high traffic site, this is a real concern.
P_I wrote: Sun Sep 16, 2018 5:26 pm When updating there is also a setting in ACP->Board settings that can be used to disable the board for end-users, look for

Disable board:
This will make the board unavailable to users who are neither administrators nor moderators. You can also enter a short (255 character) message to display if you wish.
...
Yes, but this is a change in behavior and does not follow the current documentation - it should automatically go offline. That's why I think there is a problem with the update.
User avatar
P_I
Community Team Member
Community Team Member
Posts: 2344
Joined: Tue Mar 01, 2011 8:35 pm
Location: Western Canada 🇨🇦
Contact:

Re: Update from phpBB 3.2.2 to 3.2.3 - database does not go offline

Post by P_I »

Lumpy Burgertushie wrote: Sun Sep 16, 2018 5:41 pm the problem with setting that message to users is that when you are using the proper update method of file replacement, that message will not show up while you are deleting the old files and uploading the new ones etc.
That's a limitation I would agree. But deleting old files and uploading new ones won't take much time. Once that's completed, the board will show the message again. But it could also cover the time you are doing file and database backups too, so it's a end-user friendly means to indicating the board has been taken offline for a reason and to provide that reason.
once you have finished the file replacement the database update only takes a couple of minutes.
Depends on the database size. It could take time, hence the value of the message indicating the board is currently offline.
point being that it is really a waste of time to worry about all that.
Respectfully disagree for the reasons stated above. It is standard operating procedure for my boards to first disable the board gracefully using this functionality, then perform the work. YMMV.

Proper
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
Lady_G
Registered User
Posts: 272
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: Update from phpBB 3.2.2 to 3.2.3 - database does not go offline

Post by Lady_G »

Going further, I navigated to the install/ directory.

There are 5 steps in the Update tab.
  • Introduction
  • Check requirements
  • Set installation data
  • Update files
  • Update database
I start with Introduction, then click my only option "Update".

The updater skips to the 4th step, Update files, and then stops with an error.
The file differ failed to open Array.

[phpBB Debug] "file_get_contents(../install/update/new/adm/style/acp_attachments.html): failed to open stream: No such file or directory" in file /var/www/html/forum/phpbb/install/module/update_filesystem/task/diff_files.php on line 182

[phpBB Debug] "Array to string conversion" in file /var/www/html/forum/phpbb/language/language.php on line 313
The error is correct - ../install/update/new/adm/style/acp_attachments.html does not exist.

I have the American English language pack installed. I set the default language to British English, but the errors repeated.

I'm guessing the errors are due to the install skipping my configuration info. How can this be debugged?
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52767
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Update from phpBB 3.2.2 to 3.2.3 - database does not go offline

Post by stevemaury »

Do not use the Automatic update package. Do this - Knowledge Base - Updating 3.2.x
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
Lady_G
Registered User
Posts: 272
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: Update from phpBB 3.2.2 to 3.2.3 - database does not go offline

Post by Lady_G »

Thank you. My previous update was from (3.2.1 to 3.2.2) and I don't understand why I have this problem now. In any case, I will update as you've suggested.

I have filed two bug reports to help with the documentation.

- [WEBSITE-1351] Broken install - phpBB 3.2.x Download instructions missing

- [WEBSITE-1352] Knowledge Base - Updating 3.2.x - phpBB Tracker
Helios7
Registered User
Posts: 81
Joined: Mon Jul 24, 2017 9:44 pm

Re: Update from phpBB 3.2.2 to 3.2.3 - database does not go offline

Post by Helios7 »

stevemaury wrote: Sun Sep 16, 2018 8:42 pm Do not use the Automatic update package. Do this - Knowledge Base - Updating 3.2.x
I too tried using "Automatic update package" while i was updating from 3.2.1 to 3.2.2 and after numerous tries (probably something on my forum caused it) and losing a few hrs posts had to try this "Full Package" method and it worked without an issue (except i had to delete "cache/production folder" to gain access after a "Fatal error report").

Though its a much lengthier and time consuming task i believe its the best one for me. :)
Lady_G
Registered User
Posts: 272
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: Update from phpBB 3.2.2 to 3.2.3 - database does not go offline

Post by Lady_G »

To be fair, it takes a large effort to support the many, many configurations.

My board's database has been upgraded since phpBB 2.x. It is also postgreSQL (26 GB in size), which is not as popular as MySQL. I've worked through database update problems before. The file diff problem is new to me.

Whatever is causing the problem is most probably not worth the effort to fix. So, the best approach is to start from the "stock" full install and incorporate changes on top of that.

I have confidence (and a backup ;) ).
User avatar
Marc
Development Team Leader
Development Team Leader
Posts: 5657
Joined: Tue Oct 30, 2007 10:57 pm
Location: Munich, Germany
Name: Marc
Contact:

Re: Update from phpBB 3.2.2 to 3.2.3 - database does not go offline

Post by Marc »

Lady_G wrote: Sun Sep 16, 2018 7:21 pm Going further, I navigated to the install/ directory.

There are 5 steps in the Update tab.
  • Introduction
  • Check requirements
  • Set installation data
  • Update files
  • Update database
I start with Introduction, then click my only option "Update".

The updater skips to the 4th step, Update files, and then stops with an error.
The file differ failed to open Array.

[phpBB Debug] "file_get_contents(../install/update/new/adm/style/acp_attachments.html): failed to open stream: No such file or directory" in file /var/www/html/forum/phpbb/install/module/update_filesystem/task/diff_files.php on line 182

[phpBB Debug] "Array to string conversion" in file /var/www/html/forum/phpbb/language/language.php on line 313
The error is correct - ../install/update/new/adm/style/acp_attachments.html does not exist.

I have the American English language pack installed. I set the default language to British English, but the errors repeated.

I'm guessing the errors are due to the install skipping my configuration info. How can this be debugged?
The file you're mentioning does not exist in the 3.2.2 to 3.2.3 update package because it shouldn't. Can you paste the content of install/update/index.php (ideally on a pastebin or inside [ code ])?
Lady_G
Registered User
Posts: 272
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: Update from phpBB 3.2.2 to 3.2.3 - database does not go offline

Post by Lady_G »

Downloaded as phpBB-3.2.2_to_3.2.3.tar.bz2, the contents of install/update/index.php are:

Code: Select all

<?php

if (!defined('IN_PHPBB'))
{
	exit;
}

// Set update info with file structure to update
$update_info = array(
	'version'	=> array('from' => '3.2.2', 'to' => '3.2.3'),
	'files'		=> array(
		'adm/style/acp_ext_list.html',
		'adm/style/acp_groups.html',
		'adm/style/acp_language.html',
		'adm/style/acp_main.html',
		'adm/style/acp_styles.html',
		'adm/style/admin.css',
		'adm/style/permission_mask.html',
		'adm/style/tooltip.js',
		'assets/javascript/core.js',
		'composer.json',
		'composer.lock',
		'config/default/container/services_text_formatter.yml',
		'includes/acp/acp_board.php',
		'includes/acp/acp_forums.php',
		'includes/acp/acp_groups.php',
		'includes/acp/acp_main.php',
		'includes/acp/acp_search.php',
		'includes/acp/acp_styles.php',
		'includes/acp/acp_users.php',
		'includes/constants.php',
		'includes/functions.php',
		'includes/functions_messenger.php',
		'includes/functions_posting.php',
		'includes/mcp/mcp_queue.php',
		'language/en/acp/board.php',
		'language/en/acp/common.php',
		'language/en/acp/search.php',
		'language/en/acp/styles.php',
		'language/en/captcha_recaptcha.php',
		'language/en/common.php',
		'language/en/help/faq.php',
		'language/en/install.php',
		'phpbb/auth/provider/oauth/oauth.php',
		'phpbb/avatar/driver/upload.php',
		'phpbb/db/driver/driver.php',
		'phpbb/db/migration/data/v310/auth_provider_oauth.php',
		'phpbb/db/migration/data/v32x/enable_accurate_pm_button.php',
		'phpbb/db/migration/data/v32x/fix_user_styles.php',
		'phpbb/db/migration/data/v32x/merge_duplicate_bbcodes.php',
		'phpbb/db/migration/data/v32x/v323.php',
		'phpbb/db/migration/data/v32x/v323rc1.php',
		'phpbb/db/migration/data/v32x/v323rc2.php',
		'phpbb/db/migration/tool/module.php',
		'phpbb/debug/error_handler.php',
		'phpbb/file_downloader.php',
		'phpbb/filesystem/filesystem.php',
		'phpbb/install/helper/database.php',
		'phpbb/report/report_handler_pm.php',
		'phpbb/report/report_handler_post.php',
		'phpbb/search/fulltext_mysql.php',
		'phpbb/search/fulltext_native.php',
		'phpbb/search/fulltext_postgres.php',
		'phpbb/search/fulltext_sphinx.php',
		'phpbb/template/assets_bag.php',
		'phpbb/textformatter/s9e/bbcode_merger.php',
		'phpbb/textformatter/s9e/factory.php',
		'phpbb/textreparser/plugins/poll_title.php',
		'styles/prosilver/style.cfg',
		'styles/prosilver/template/overall_footer.html',
		'styles/prosilver/template/ucp_pm_viewmessage.html',
		'styles/prosilver/template/viewtopic_body.html',
		'styles/prosilver/template/viewtopic_topic_tools.html',
		'styles/prosilver/theme/common.css',
		'viewtopic.php',
	),
	'binary'		=> array(),
	'deleted'		=> array(),
);
---------------------
After performing the "Full Package" update, I updated my database from the command line, I received several PHP warnings. The database update was successful.

Code: Select all

#  php ./bin/phpbbcli.php db:migrate --safe-mode
Installed Schema: \phpbb\db\migration\data\v32x\enable_accurate_pm_button; Time: 0.00 seconds
Installed Data: \phpbb\db\migration\data\v32x\enable_accurate_pm_button; Time: 0.01 seconds
Installed Schema: \phpbb\db\migration\data\v32x\v323rc1; Time: 0.00 seconds
PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /var/www/html/forum/phpbb/cache/driver/memory.php on line 191
Installed Data: \phpbb\db\migration\data\v32x\v323rc1; Time: 0.00 seconds
Installed Schema: \phpbb\db\migration\data\v32x\v323rc2; Time: 0.00 seconds
PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /var/www/html/forum/phpbb/cache/driver/memory.php on line 191
Installed Data: \phpbb\db\migration\data\v32x\v323rc2; Time: 0.00 seconds
Installed Schema: \phpbb\db\migration\data\v32x\v323; Time: 0.00 seconds
PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /var/www/html/forum/phpbb/cache/driver/memory.php on line 191
Installed Data: \phpbb\db\migration\data\v32x\v323; Time: 0.00 seconds
My config.php contains:

Code: Select all

$acm_type = 'memcache';
There may be some incompatibility with memcache and PHP (or, I need to modify a phpbb/cache/driver file). I will investigate further.

--------------------------
Next, I tested the automatic update package.

Knowledge Base > Updating 3.2.x is missing a critical step (delete store/install_config.php).

After deleting store/install_config.php), the database was updated as expected. I have updated my bug report with a suggested description. See: [WEBSITE-1352] Knowledge Base - Updating 3.2.x - phpBB Tracker

This test was performed after the command line update. There was nothing to do, no errors.
Last edited by Lady_G on Thu Sep 20, 2018 12:59 am, edited 1 time in total.
Lady_G
Registered User
Posts: 272
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: Update from phpBB 3.2.2 to 3.2.3 - database does not go offline

Post by Lady_G »

Lady_G wrote: Tue Sep 18, 2018 1:28 am ...After performing the "Full Package" update, I updated my database from the command line, I received several PHP warnings. The database update was successful.

Code: Select all

#  php ./bin/phpbbcli.php db:migrate --safe-mode
Installed Schema: \phpbb\db\migration\data\v32x\enable_accurate_pm_button; Time: 0.00 seconds
Installed Data: \phpbb\db\migration\data\v32x\enable_accurate_pm_button; Time: 0.01 seconds
Installed Schema: \phpbb\db\migration\data\v32x\v323rc1; Time: 0.00 seconds
PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /var/www/html/forum/phpbb/cache/driver/memory.php on line 191
Installed Data: \phpbb\db\migration\data\v32x\v323rc1; Time: 0.00 seconds
Installed Schema: \phpbb\db\migration\data\v32x\v323rc2; Time: 0.00 seconds
PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /var/www/html/forum/phpbb/cache/driver/memory.php on line 191
Installed Data: \phpbb\db\migration\data\v32x\v323rc2; Time: 0.00 seconds
Installed Schema: \phpbb\db\migration\data\v32x\v323; Time: 0.00 seconds
PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /var/www/html/forum/phpbb/cache/driver/memory.php on line 191
Installed Data: \phpbb\db\migration\data\v32x\v323; Time: 0.00 seconds
My config.php contains:

Code: Select all

$acm_type = 'memcache';
There may be some incompatibility with memcache and PHP (or, I need to modify a phpbb/cache/driver file). I will investigate further.
...
There may be a compatibility problem with PHP. I have experienced this problem with an earlier upgrade. As a work-around, I replaced memcache with the phpBB file cache.

Code: Select all

$acm_type = 'phpbb\\cache\\driver\\file';
There were no warnings, the upgrade was successful. I will restore the memcache configuration after the upgrade has completed.

I have created a bug report: [PHPBB3-15796] Database update with 3.2.3 'Full Package' has PHP Warning - memcache

Update: 20-Sep: The bug has been fixed. See: [PHPBB3-15791] php 7.2 count() bug in memory cache driver - phpBB Tracker
Post Reply

Return to “[3.2.x] Support Forum”