database_update.php failing silently

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Get Involved
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
User avatar
P_I
Community Team Member
Community Team Member
Posts: 2156
Joined: Tue Mar 01, 2011 8:35 pm
Location: Western Canada 🇨🇦
Contact:

database_update.php failing silently

Post by P_I »

As I reported here, attempts to testing upgrading from phpBB 3.0.12 to phpBB 3.1.0-RC6 have been failing when tested on our hosting site. We're still trying to figure out the failure mechanism, however there is another concern.

During the execution of database_update.php, a number of other routines/scripts are executed. From the comparison of the output, we can see that on our hosted site, a number of scripts are appear not to have been executed, but these failures are silently occurring. Shouldn't the database_update.php script detect and report these failures?
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
nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 546
Joined: Sun Apr 13, 2014 1:47 am
Location: Grenoble - France

Re: database_update.php failing silently

Post by nicofuma »

Can you be more precise please? "failure" and "script" sound too general to me.
Member of phpBB Development-Team
No Support via PM
User avatar
P_I
Community Team Member
Community Team Member
Posts: 2156
Joined: Tue Mar 01, 2011 8:35 pm
Location: Western Canada 🇨🇦
Contact:

Re: database_update.php failing silently

Post by P_I »

Sure. From my post in the linked topic.
P_I wrote:When I compare the output from database_update.php between the two systems, both systems indicate
Updating database to latest stable release

Database type :: mysqli
Previous version :: 3.0.12
However the following lines exist on the local testbed BUT not on the hosted system
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_12_rc1
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_12_rc2
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_12_rc3
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_12
Installed Schema: \phpbb\db\migration\data\v30x\local_url_bbcode; Time: 0.00 seconds
Installed Data: \phpbb\db\migration\data\v30x\local_url_bbcode; Time: 0.00 seconds
Installed Schema: \phpbb\db\migration\data\v310\timezone; Time: 0.03 seconds
Installed Data: \phpbb\db\migration\data\v310\timezone; Time: 0.01 seconds
By examining the output from database_update.php on two different systems, I've noticed that on one system the above sub-elements of database_update.php did not execute and there was no indication of a failure.

I've captured the full output from both systems and can post them in their entirety if that would help. The failure on the hosted system is repeatable, every time!

I'm a software developer, so please let me know if there are other details and/or tests that could be helpful.
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
nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 546
Joined: Sun Apr 13, 2014 1:47 am
Location: Grenoble - France

Re: database_update.php failing silently

Post by nicofuma »

Do you have access to a command line interface?
Member of phpBB Development-Team
No Support via PM
User avatar
P_I
Community Team Member
Community Team Member
Posts: 2156
Joined: Tue Mar 01, 2011 8:35 pm
Location: Western Canada 🇨🇦
Contact:

Re: database_update.php failing silently

Post by P_I »

Yes. On both systems.
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
nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 546
Joined: Sun Apr 13, 2014 1:47 am
Location: Grenoble - France

Re: database_update.php failing silently

Post by nicofuma »

try to run the bin/phpbbcli.php script so (php bin/phpbbcli.php bd:migrate -vvv)
Member of phpBB Development-Team
No Support via PM
User avatar
P_I
Community Team Member
Community Team Member
Posts: 2156
Joined: Tue Mar 01, 2011 8:35 pm
Location: Western Canada 🇨🇦
Contact:

Re: database_update.php failing silently

Post by P_I »

nicofuma wrote:try to run the bin/phpbbcli.php script so (php bin/phpbbcli.php bd:migrate -vvv)
Suspect a typo, should be db:migrate ?
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
nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 546
Joined: Sun Apr 13, 2014 1:47 am
Location: Grenoble - France

Re: database_update.php failing silently

Post by nicofuma »

yes, sorry
Member of phpBB Development-Team
No Support via PM
User avatar
P_I
Community Team Member
Community Team Member
Posts: 2156
Joined: Tue Mar 01, 2011 8:35 pm
Location: Western Canada 🇨🇦
Contact:

Re: database_update.php failing silently

Post by P_I »

It fails.

Code: Select all

 php-cli bin/phpbbcli.php db:migrate -vvv

Fatal error: SQL ERROR [ mysqli ]<br /><br />Table 'dbname.private_ext' doesn't exist [1146]<br /><br />SQL<br /><br />SELECT *
                        FROM private_ext
                        WHERE ext_active = 1 in <directory_path>/Test31x/phpbb/db/driver/driver.php on line 855
To protect information, I've used <directory_path> to replace the top level directories.
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
nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 546
Joined: Sun Apr 13, 2014 1:47 am
Location: Grenoble - France

Re: database_update.php failing silently

Post by nicofuma »

you need to run the first step of the database_update.php script before yes...
Member of phpBB Development-Team
No Support via PM
User avatar
P_I
Community Team Member
Community Team Member
Posts: 2156
Joined: Tue Mar 01, 2011 8:35 pm
Location: Western Canada 🇨🇦
Contact:

Re: database_update.php failing silently

Post by P_I »

nicofuma wrote:you need to run the first step of the database_update.php script before yes...
Not sure I understand. First run database_update.php and let it fail, then run phpbbcli command as you've indicated?

The error I showed was the result of loading the database from a phpBB 3.0.12 mysqldump, then running phpbbcli command.
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
nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 546
Joined: Sun Apr 13, 2014 1:47 am
Location: Grenoble - France

Re: database_update.php failing silently

Post by nicofuma »

try to run database_update.php and then the console command so.

P.S Which version do you use? RC6?
Member of phpBB Development-Team
No Support via PM
User avatar
P_I
Community Team Member
Community Team Member
Posts: 2156
Joined: Tue Mar 01, 2011 8:35 pm
Location: Western Canada 🇨🇦
Contact:

Re: database_update.php failing silently

Post by P_I »

Using the 3.1.0-RC6 Full package download and following docs/INSTALL.html#update30. On a shared hosting service, FWIW.

The following is the most recent output when I browse to install/database_update.php

Code: Select all

Updating database to latest stable release

Database type :: mysqli
Previous version :: 3.0.12
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_0
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_1_rc1
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_1
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_2_rc1
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_2_rc2
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_2
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_3_rc1
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_3
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_4_rc1
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_4
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_5_rc1
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_5_rc1part2
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_5
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_6_rc1
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_6_rc2
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_6_rc3
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_6_rc4
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_6
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_7_rc1
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_7_rc2
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_7
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_7_pl1
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_8_rc1
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_8
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_9_rc1
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_9_rc2
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_9_rc3
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_9_rc4
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_9
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_10_rc1
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_10_rc2
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_10_rc3
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_10
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_11_rc1
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_11_rc2
Migration already effectively installed (skipped): \phpbb\db\migration\data\v30x\release_3_0_11
Installed Schema: \phpbb\db\migration\data\v310\extensions; Time: 0.02 seconds
Installed Data: \phpbb\db\migration\data\v310\extensions; Time: 0.12 seconds
Installed Schema: \phpbb\db\migration\data\v310\style_update_p1; Time: 0.04 seconds
Installed Data: \phpbb\db\migration\data\v310\style_update_p1; Time: 0.02 seconds
Installed Schema: \phpbb\db\migration\data\v310\style_update_p2; Time: 0.06 seconds
Installed Data: \phpbb\db\migration\data\v310\style_update_p2; Time: 0.00 seconds
Installed Schema: \phpbb\db\migration\data\v310\timezone; Time: 0.04 seconds
Installed Data: \phpbb\db\migration\data\v310\timezone; Time: 0.01 seconds
Installed Schema: \phpbb\db\migration\data\v310\timezone_p2; Time: 0.02 seconds
Installed Data: \phpbb\db\migration\data\v310\timezone_p2; Time: 0.00 seconds
Installed Schema: \phpbb\db\migration\data\v310\reported_posts_display; Time: 0.02 seconds
Installed Data: \phpbb\db\migration\data\v310\reported_posts_display; Time: 0.00 seconds
Migration already effectively installed (skipped): \phpbb\db\migration\data\v310\migrations_table
Installed Schema: \phpbb\db\migration\data\v310\dev; Time: 0.34 seconds
Installed Data: \phpbb\db\migration\data\v310\dev; Time: 0.34 seconds
Installed Schema: \phpbb\db\migration\data\v310\mod_rewrite; Time: 0.00 seconds
Installed Data: \phpbb\db\migration\data\v310\mod_rewrite; Time: 0.00 seconds
Installed Schema: \phpbb\db\migration\data\v310\contact_admin_form; Time: 0.00 seconds
SQL ERROR [ mysqli ]

Table 'dbname.private_config_text' doesn't exist [1146]

SQL

UPDATE private_config_text SET config_value = '' WHERE config_name = 'contact_admin_info'

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 194
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/phpbb/config/db_text.php
LINE: 103
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/phpbb/db/migration/data/v310/contact_admin_form.php
LINE: 39
CALL: phpbb\config\db_text->set_array()

FILE: (not given by php)
LINE: (not given by php)
CALL: phpbb\db\migration\data\v310\contact_admin_form->contact_admin_info()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 459
CALL: call_user_func_array()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 405
CALL: phpbb\db\migrator->run_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 253
CALL: phpbb\db\migrator->process_data_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 155
CALL: phpbb\db\migrator->try_apply()

FILE: [ROOT]/install/database_update.php
LINE: 206
CALL: phpbb\db\migrator->update()
Following this, move to command line and execute php-cli bin/phpbbcli.php db:migrate -vvv and get

Code: Select all

Fatal error: SQL ERROR [ mysqli ]<br /><br />Table 'dbname.private_config_text' doesn't exist [1146]<br /><br />SQL<br /><br />UPDATE private_config_text
                                SET config_value = ''
                                WHERE config_name = 'contact_admin_info' in /<pathname>/phpbb/db/driver/driver.php on line 855
The mysterious part to me is the output correctly identifies the previous version of the database as 3.0.12, but looking at the various "Migration already effectively installed (skipped) ..." lines, they stop at 3_0_11, which seems to indicate to me that somehow the 3_0_12* ones get missed (they appear on my local testbed). As the original post mentions, the silent failures of these seems to provide a clue to why it eventually fails with an SQL ERROR.
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
nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 546
Joined: Sun Apr 13, 2014 1:47 am
Location: Grenoble - France

Re: database_update.php failing silently

Post by nicofuma »

Found it: https://github.com/phpbb/phpbb/pull/3082
Thanks for the report.
Member of phpBB Development-Team
No Support via PM
User avatar
P_I
Community Team Member
Community Team Member
Posts: 2156
Joined: Tue Mar 01, 2011 8:35 pm
Location: Western Canada 🇨🇦
Contact:

Re: database_update.php failing silently

Post by P_I »

Your welcome and thanks for your help.

I'm still not totally convinced there are not other lurking problems as the output of install/database_update.php, run against the same 3.0.12 database have significant different output lines.

Look back at the original post, I highlighted a number of lines that were output on a local testbed, but do not appear on a hosted system. Against the same database, shouldn't the outputs match?
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
Locked

Return to “[3.1.x] Support Forum”