removing prefix

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
thepreacher
Registered User
Posts: 8
Joined: Thu Jul 20, 2017 10:42 pm

removing prefix

Post by thepreacher »

What files need to be editted/how to completely remove the database prefix?
User avatar
KevC
Support Team Member
Support Team Member
Posts: 72616
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK

Re: removing prefix

Post by KevC »

Remove it in phpmyadmin for each table and edit the config.php file to match.
I'm not really sure what the point would be though.
-:|:- Support Request Template -:|:-
Image
"Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb"
thepreacher
Registered User
Posts: 8
Joined: Thu Jul 20, 2017 10:42 pm

Re: removing prefix

Post by thepreacher »

Because otherwise I'd need 2 users tables for integration
thepreacher
Registered User
Posts: 8
Joined: Thu Jul 20, 2017 10:42 pm

Re: removing prefix

Post by thepreacher »

Ok, I tried that and got 503

[21-Aug-2017 07:03:38 America/New_York] PHP Fatal error: Uncaught Error: Call to undefined method database::sql_close() in /forums/includes/functions.php:4736
Stack trace:
#0 /forums/includes/functions.php(3336): garbage_collection()
#1 [internal function]: msg_handler(256, 'SQL ERROR [ mys...', '/forums...', 999, Array)
#2 /forums/phpbb/db/driver/driver.php(999): trigger_error('SQL ERROR [ mys...', 256)
#3 /forums/phpbb/db/driver/mysqli.php(193): phpbb\db\driver\driver->sql_error('SELECT config_n...')
#4 /forums/phpbb/db/driver/factory.php(329): phpbb\db\driver\mysqli->sql_query('SELECT config_n...', 0)
#5 /forums/phpbb/config/db.php(57): phpbb\db\driver\factory->sql_query('SELECT config_n...')
#6 /forums/cache/production/container_e37d40c70e76cc491c1b742bba0ca8f9.php(757): phpbb\config\db->__construct(Object(phpbb\db\driver\factory), Object(phpbb\cache\driver\file), 'phpbban_c in /forums/includes/functions.php on line 4736
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: removing prefix

Post by david63 »

Did you purge the cache after making the changes?
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
thepreacher
Registered User
Posts: 8
Joined: Thu Jul 20, 2017 10:42 pm

Re: removing prefix

Post by thepreacher »

Same error still. But it has more to do with the SSO integration.

Here is the particular portion I believe:

Code: Select all

session_regenerate_id();
    $_SESSION['loggedin'] = 1;
    $_SESSION['userid'] = $mem['user_id'];
    $IP = $db->escape($_SERVER['REMOTE_ADDR']);
    $db->query("UPDATE `users` SET `lastip_login` = '$IP', `last_login` = " . $_SERVER['REQUEST_TIME'] . " WHERE `user_id` = {$mem['user_id']}");
    }
So now I'm trying to learn the request portion of phpbb
thepreacher
Registered User
Posts: 8
Joined: Thu Jul 20, 2017 10:42 pm

Re: removing prefix

Post by thepreacher »

So, I've cleared my cache and the server cache. closed the browser, restarted and still get:

General Error
SQL ERROR [ mysqli ]

Table '****.insertprefix_config' doesn't exist [1146]

An sql error occurred while fetching this page. Please contact an administrator if this problem persists.

Is there anywhere else this might have been written to during installation?
User avatar
AmigoJack
Registered User
Posts: 6127
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン

Re: removing prefix

Post by AmigoJack »

No. Or a non-professional custom code or extension. And your internet browser has nothing to do with phpBB's cache.
thepreacher wrote: Mon Aug 21, 2017 7:31 pmTable '****.insertprefix_config'
This implies your /config.php looks like this:

Code: Select all

	$table_prefix= 'insertprefix_';
when it should look like this:

Code: Select all

	$table_prefix= '';
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
thepreacher
Registered User
Posts: 8
Joined: Thu Jul 20, 2017 10:42 pm

Re: removing prefix

Post by thepreacher »

the table prefix literally was ''.

I used that same file to also update the database name change. It updated the database name change, but not the table prefix.
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52794
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve

Re: removing prefix

Post by stevemaury »

See attached. May need tweaking for newer version. Delete the .txt extension before running.
You do not have the required permissions to view the files attached to this post.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

Return to “phpBB Custom Coding”