database_update.php error

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Scam Warning
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.
Locked
wjkuzma
Registered User
Posts: 6
Joined: Mon Apr 20, 2009 3:51 pm

database_update.php error

Post by wjkuzma »

Whne I ran the database_update.php on my old board (a seperate copy) I recieved this error
SQL ERROR [ mysqli ]

Unknown column 'field_show_on_pm' in 'field list' [1054]

SQL

INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_profile, field_hide, field_no_view, field_active, field_order) VALUES ('phpbb_interests', 'profilefields.type.text', 'phpbb_interests', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 1, 0, 0, 1, 1)

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/db/migration/profilefield_base_migration.php
LINE: 98
CALL: phpbb\db\driver\factory->sql_query()

FILE: (not given by php)
LINE: (not given by php)
CALL: phpbb\db\migration\profilefield_base_migration->create_custom_field()

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: 205
CALL: phpbb\db\migrator->try_apply()

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

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

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

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

FILE: [ROOT]/install-1/database_update.php
LINE: 206
CALL: phpbb\db\migrator->update()



Now when I log into the board I get this error


General Error
SQL ERROR [ mysqli ]

Data too long for column 'user_password' at row 1 [1406]

An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10397
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

Re: database_update.php error

Post by Noxwizard »

What version of phpBB are you updating from and how did you update?
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.
wjkuzma
Registered User
Posts: 6
Joined: Mon Apr 20, 2009 3:51 pm

Re: database_update.php error

Post by wjkuzma »

Current version 3.0.12
Latest version 3.0.12

I uploaded all the files in the install in a new directory then made a new MySQL data base and imported my main database to that and added the config with the new database name and password then I used the database_update_php to update the database

when I try to register as a new user
I get this error
Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\InvalidArgumentException' with message 'The service definition "phpbb_captcha_sortables" does not exist.' in /home4/wkuzma/public_html/new3/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php:871 Stack trace: #0 /home4/wkuzma/public_html/new3/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php(478): Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition('phpbb_captcha_s...') #1 /home4/wkuzma/public_html/new3/phpbb/captcha/factory.php(48): Symfony\Component\DependencyInjection\ContainerBuilder->get('phpbb_captcha_s...') #2 /home4/wkuzma/public_html/new3/includes/ucp/ucp_register.php(185): phpbb\captcha\factory->get_instance('phpbb_captcha_s...') #3 /home4/wkuzma/public_html/new3/includes/functions_module.php(674): ucp_register->main('register', NULL) #4 /home4/wkuzma/public_html/new3/includes/functions_module.php(998): p_master->load_active(fal in /home4/wkuzma/public_html/new3/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php on line 871
User avatar
wkuzma
Registered User
Posts: 392
Joined: Sun Sep 02, 2007 10:18 pm
Contact:

Re: database_update.php error

Post by wkuzma »

Problem solved

How I finially got it to update was by deleting the database and re-importing it and running the update on it each time, Finially on the sixth try all went smooth with no errors and I can login without a problem.
executifs
Registered User
Posts: 12
Joined: Wed Mar 26, 2014 1:45 am

Re: database_update.php error

Post by executifs »

I encountered the exact same problem.
Dropping the forum database, restoring the backup and trying again worked.
User avatar
KevC
Support Team Member
Support Team Member
Posts: 70067
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: database_update.php error

Post by KevC »

Deleting the database should be the very last thing you even consider doing. It is your entire board. All the users and posts. If you haven't backed it up properly and checked that the backup is complete then you could lose everything. There's little to no advantage in deleting it only to restore exactly the same copy again. It was unlikely to be the reason for the fix.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"
warnox
Registered User
Posts: 20
Joined: Sun Mar 22, 2009 11:11 am

Re: database_update.php error

Post by warnox »

I was getting the same error and noticed that the "field_show_on_pm" field didn't exist in my current 3.0.14 database so obviously the backup .SQL file didn't contain it either. Adding this line into the .SQL file before importing it fixed the problem and the database_update.php file executed successfully.
CREATE TABLE `phpbb_profile_fields` (
`field_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`field_name` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`field_type` tinyint(4) NOT NULL DEFAULT '0',
`field_ident` varchar(20) COLLATE utf8_bin NOT NULL DEFAULT '',
`field_length` varchar(20) COLLATE utf8_bin NOT NULL DEFAULT '',
`field_minlen` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`field_maxlen` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`field_novalue` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`field_default_value` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`field_validation` varchar(20) COLLATE utf8_bin NOT NULL DEFAULT '',
`field_required` tinyint(1) unsigned NOT NULL DEFAULT '0',
`field_show_novalue` tinyint(1) unsigned NOT NULL DEFAULT '0',
`field_show_on_reg` tinyint(1) unsigned NOT NULL DEFAULT '0',
`field_show_on_pm` tinyint(1) unsigned NOT NULL DEFAULT '0',
`field_show_on_vt` tinyint(1) unsigned NOT NULL DEFAULT '0',
`field_show_profile` tinyint(1) unsigned NOT NULL DEFAULT '0',
`field_hide` tinyint(1) unsigned NOT NULL DEFAULT '0',
`field_no_view` tinyint(1) unsigned NOT NULL DEFAULT '0',
`field_active` tinyint(1) unsigned NOT NULL DEFAULT '0',
`field_order` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`field_id`),
KEY `fld_type` (`field_type`),
KEY `fld_ordr` (`field_order`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Hope this helps out others having this issue.
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: database_update.php error

Post by Oyabun1 »

warnox wrote: was getting the same error and noticed that the "field_show_on_pm" field didn't exist in my current 3.0.14 database
Because it is not supposed to be in a 3.0.x database. It is added by the database update process.

If it is not present in the 3.1.x database then an update step has not completed correctly. It is dangerous to manually add fields to the database because other steps may also be missing.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
warnox
Registered User
Posts: 20
Joined: Sun Mar 22, 2009 11:11 am

Re: database_update.php error

Post by warnox »

Shouldn't an error show up when the field is being added then? Since I added the filed to the backup file I don't expect any issues if the update script runs fine.
marcovo
Registered User
Posts: 239
Joined: Fri Nov 16, 2012 12:19 pm
Location: The Netherlands
Name: Marco

Re: database_update.php error

Post by marcovo »

I also posted this issue here:
https://tracker.phpbb.com/browse/PHPBB3-13700
Locked

Return to “[3.1.x] Support Forum”