Upgrade to 3.3.12, MYSQL error

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
panhead
Registered User
Posts: 968
Joined: Sat Dec 20, 2003 8:17 pm

Upgrade to 3.3.12, MYSQL error

Post by panhead »

I also have this problem:

Code: Select all

Upgrade to 3.3.12, MYSQL error
and

Code: Select all

General Error
SQL ERROR [ mysqli ]

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

An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.
Used the full package upgrade and changed the

Code: Select all

max_execution_time
from 30 to 900. Did not work.
Any help appreciated.
panhead
Registered User
Posts: 968
Joined: Sat Dec 20, 2003 8:17 pm

Re: Upgrade to 3.3.12, MYSQL error

Post by panhead »

I uploaded a backup, 3.3.11 is running again.
panhead
Registered User
Posts: 968
Joined: Sat Dec 20, 2003 8:17 pm

Re: Upgrade to 3.3.12, MYSQL error

Post by panhead »

But I still like to know why this happened and what to do to make the update successful.
HB
Registered User
Posts: 230
Joined: Mon May 16, 2005 9:30 pm

Re: Upgrade to 3.3.12, MYSQL error

Post by HB »

That was a new field added to the USERS table. I assume you did not run the database update, or you ran the install logged in as a database user that doesn't have ALTER permissions.

By the way, you can look up all the database schema/data changes for a given release in phpbb/db/migration/data. For example:

https://github.com/phpbb/phpbb/blob/mas ... /v3312.php

Code: Select all

	public static function depends_on()
	{
		return [
			'\phpbb\db\migration\data\v33x\add_resend_activation_expiration',
			'\phpbb\db\migration\data\v33x\add_user_last_active',
			'\phpbb\db\migration\data\v33x\v3312rc1',
		];
	}
That leads you to the one that prompted your question:

https://github.com/phpbb/phpbb/blob/mas ... active.php

You might try running the database update from the command line, assuming you have access (e.g., php bin/phpbbcli db:migrate). That runs the same migration steps that the installer does.
Dan Kehn
User avatar
ssl
Registered User
Posts: 2023
Joined: Sat Feb 08, 2020 2:15 pm
Location: Le Lude, Pays de la Loire - France
Name: Fred Rimbert

Re: Upgrade to 3.3.12, MYSQL error

Post by ssl »

panhead wrote: Tue Jul 16, 2024 11:33 am Any help appreciated.
Connect via FTP to the root of your board and go to the folder in the ./store directory, delete all files install_config.php, * io_lock .lock or migrations_XXXXXXXXXX.log *

In the ./cache directory on the server, delete:
  • The install folder
  • The production file
Update using the full package method for version 3.3.12
Sorry for my English ... I do my best! :anger_right:

:point_right_tone3: phpBB: 3.3.14 | PHP: 8.3.12
:point_right_tone4: [Kill spam on phpBB] - [Some French translation of extensions]
"Mistress, Mistress someone is bothering me in pm"
panhead
Registered User
Posts: 968
Joined: Sat Dec 20, 2003 8:17 pm

Re: Upgrade to 3.3.12, MYSQL error

Post by panhead »

Thanks for the replies.
Connect via FTP to the root of your board and go to the folder in the ./store directory, delete all files install_config.php, * io_lock .lock or migrations_XXXXXXXXXX.log *

In the ./cache directory on the server, delete:
The install folder
The production file
Update using the full package method for version 3.3.12
Did that, but still no success.
I assume you did not run the database update, or you ran the install logged in as a database user that doesn't have ALTER permissions.
Did the database update as administrator, but that is where the error occurred.
panhead
Registered User
Posts: 968
Joined: Sat Dec 20, 2003 8:17 pm

Re: Upgrade to 3.3.12, MYSQL error

Post by panhead »

When my provider executed this command:

Code: Select all

php ./bin/phpbbcli.php db:migrate --safe-mode
they got this error:

Code: Select all

[deb125159@s175 phpBB3]$ php ./bin/phpbbcli.php db:migrate --safe-mode
PHP Parse error:  Unclosed '(' on line 91 in /home/deb125159/domains/hydra-glide.net/public_html/phpBB3/phpbb/db/migration/data/v310/dev.php on line 200
upload-error.jpg
Don't know why I can't see the attachment.
You do not have the required permissions to view the files attached to this post.
User avatar
ssl
Registered User
Posts: 2023
Joined: Sat Feb 08, 2020 2:15 pm
Location: Le Lude, Pays de la Loire - France
Name: Fred Rimbert

Re: Upgrade to 3.3.12, MYSQL error

Post by ssl »

This error message seems to mean that it is not possible to access the database

array('custom', array(array($this, 'update_ucp_pm_basename'))),
Sorry for my English ... I do my best! :anger_right:

:point_right_tone3: phpBB: 3.3.14 | PHP: 8.3.12
:point_right_tone4: [Kill spam on phpBB] - [Some French translation of extensions]
"Mistress, Mistress someone is bothering me in pm"
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6415
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: Upgrade to 3.3.12, MYSQL error

Post by thecoalman »

panhead wrote: Thu Jul 18, 2024 7:27 am Did the database update as administrator, but that is where the error occurred.
What he is suggesting is the database user defined in config.php does not have those permissions. Open that file with text editor to determine the username and database name.

This may not be available to you depending on your hosting environment but If you are using Cpanel open it and under the databases heading click MySQL Databases. On next page under the heading Current Databases find the database name listed in config.php, it's probably the only one listed. The DB username should be listed in that row, click it to see what permissions the user has.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
panhead
Registered User
Posts: 968
Joined: Sat Dec 20, 2003 8:17 pm

Re: Upgrade to 3.3.12, MYSQL error

Post by panhead »

The database user has all permissions.
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10589
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster

Re: Upgrade to 3.3.12, MYSQL error

Post by Noxwizard »

panhead wrote: Tue Jul 16, 2024 11:33 am

Code: Select all

General Error
SQL ERROR [ mysqli ]

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

An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.
If you're getting this error while doing the update itself, try logging out first, then doing the update.
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.
panhead
Registered User
Posts: 968
Joined: Sat Dec 20, 2003 8:17 pm

Re: Upgrade to 3.3.12, MYSQL error

Post by panhead »

Will do that (later)
rxu
Extensions Development Team
Posts: 3954
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation

Upgrade to 3.3.12, MYSQL error

Post by rxu »

it turns out this error may indicate incorrectly set redirection rules f.e. in nginx.
The problem is when you run the installer (to update the database), it calls app.php from the board root instead of install/app.php one. But the "root" app.php initializes session class, which causes the error because user_last_active wasn't added to the database yet.

So the fix would be setting up webserver redirection rules for install/app.php correctly.
panhead
Registered User
Posts: 968
Joined: Sat Dec 20, 2003 8:17 pm

Re: Upgrade to 3.3.12, MYSQL error

Post by panhead »

Or is it possible to start the database update manually?
User avatar
janus_zonstraal
Registered User
Posts: 6613
Joined: Sat Aug 30, 2014 1:30 pm

Re: Upgrade to 3.3.12, MYSQL error

Post by janus_zonstraal »

panhead wrote: Wed Aug 14, 2024 1:00 pm Or is it possible to start the database update manually?
[Tip

For large boards, you may wish to update via the command line instead of using a web browser. From your board's root, execute the following command: php ./bin/phpbbcli.php db:migrate --safe-mode/quote]
Sorry! My English is bat ;) !!!

Return to “[3.3.x] Support Forum”