Problem to rename Table SQL phpbb_users

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
Feofilaktt
Registered User
Posts: 5
Joined: Sat Jun 09, 2018 2:24 pm

Problem to rename Table SQL phpbb_users

Post by Feofilaktt » Wed May 22, 2019 1:00 am

Hello everyone,

I'm having a problem renaming the SQL users table.

I have already made the changes in "site/includes/constants.php":

Code: Select all

define ('USERS_TABLE', $ table_prefix. 'users');
to

Code: Select all

define ('USERS_TABLE', $ table_prefix. 'players');
But when you log in to the site, a problem occurs in the database.
Capturar.JPG
Funny that when you access the site, the anonymous user works because I can usually access the site.

But when connected with other user, this problem occurs in the table.

Any idea what this might be?

User avatar
</Solidjeuh>
Registered User
Posts: 1618
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: Problem to rename Table SQL phpbb_users

Post by </Solidjeuh> » Wed May 22, 2019 1:23 am

I don't think renaming a database table is that simple, and that table is being used by many other things. And what about extensions? You will get problems when installing extensions that use or need that table...
Register a free account & Play!!
~~~ https://www.solidjeuh.be ~~~
Have a secret? --> https://www.tellyoursecrets.eu

User avatar
EA117
Registered User
Posts: 650
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Problem to rename Table SQL phpbb_users

Post by EA117 » Wed May 22, 2019 2:11 am

If you hadn't already, also purge your cache in case there are still cache files built with the previous constant. If you cannot access ACP to invoke the purge, use FTP to delete or rename the /production subdirectory under /cache, so that it will be re-created.

If you don't mind sharing, what practical purpose or need does renaming the table provide, when the data within that table is still exactly to meet phpBB requirements and specifications? i.e. Who's problem is "fixed" by renaming the phpbb_users table, when phpBB is still the one that needs to access this table, for the uniquely phpBB-formatted user information that it contains? This seems like something the actual users never see, and something any code that needs to access the table doesn't care about (i.e. doesn't care if the name is "users").

Because I agree with Solidjeuh, renaming the table seems like a bad idea; and is just asking for long-term third-party trouble and/or future phpBB install / update / migration module trouble. Seemingly, without receiving any significant benefit in return.

User avatar
3Di
Former Team Member
Posts: 13791
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Problem to rename Table SQL phpbb_users

Post by 3Di » Wed May 22, 2019 3:09 am

Renaming the constant creates only troubles you hardly can fix.

The newly added core code, starting from 3.2.0 is not anymore based on constants but services (see: container).

You are simply getting into troubles with notifications, user loader, text reparser, auth (permissions), posts' content visibility etc.. etc..

Not to mention the extensions which are using the container instead of constants to query the tables.

And yes, you can purge the cache `ad infinitum`.. to no success.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

Feofilaktt
Registered User
Posts: 5
Joined: Sat Jun 09, 2018 2:24 pm

Re: Problem to rename Table SQL phpbb_users

Post by Feofilaktt » Wed May 22, 2019 3:33 am

I understand ... I will try other ways to achieve this goal.

My intention is to join in a same table the connection between a game server and PhPBB.

Since I can not modify the source code of the server, I thought about modifying the PhPBB table to communicate with the server.

This is my website: https://diablo.grupoblackwolf.com.br/

User avatar
3Di
Former Team Member
Posts: 13791
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Problem to rename Table SQL phpbb_users

Post by 3Di » Wed May 22, 2019 3:37 am

You simply can't do it without an extension to be made.

Moreover, I know the Blizzards' API (Diablo, Wow etc..) and that's doable only joining custom tables.
See: https://rhea.phpbbstudio.com/builds
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

Post Reply

Return to “[3.2.x] Support Forum”