2.9.3 release - !important fixes ( get_results() on string fix )

User avatar
axew3
w3all User
w3all User
Posts: 2909
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

2.9.3 release - !important fixes ( get_results() on string fix )

Post by axew3 »

The integration plugin will require often to use the custom phpBB config file (see below).
The inclusion of the custom phpBB config file avoid problems detected by long time NOT into a default WP installation, but using several and different plugins installed along with WordPress. To mention some:
- Error on deleting an user into WP MUMS if wp is mixed and use some other plugin (not known exactly which)
- Error on redirect, after the registration confirmation process using Ultimate Member
- Error on user password update using a custom and deeply modified version of WP mixed with various plugins.
- many more reported along the time.

To avoid all those problems will be necessary to include a custom phpBB config file so to provide (always) the required phpBB database connection values (see more below into this same post the DEFINITIVE 2.9.3 SOLUTION).

Code: Select all

Fix: the long time bug - "function get_results() on string" coming out on several WP configurations and with various plugins.
Fix: correctly check the password if/when the hash is in a WordPress native way.

PHP Fatal error: Uncaught Error: Call to a member function get_results() on string


It is a long time bug causing several bugs into many plugins and WP configurations.

The problem
is that sometime when the integration plugin function get_results() or some other that's related to db queries is called, the db connection is effectively NOT set because the database connection values have been lost.

The reason of problems:
When the plugin code has been changed to save the phpBB db connection values into the WP database and not anymore into a file it required to manage a big problem: if an user wrongly set the phpBB database connection values!?
Since the connection to phpBB rely into a direct call to the wpdb class, WordPress will fall into a DB CONNECTION ERROR and no way for a normal user to come out by this situation. So the code prevent the issue doing something that avoid this bad situation.
But since this change, somehow and sometime connection values are lost and the (i assumed it solved) long time bug
PHP Fatal error: Uncaught Error: Call to a member function get_results() on string
still is there.

DEFINITIVE 2.9.3 SOLUTION:
the definitive solution to this available since 2.9.3 will be so to include a custom phpBB config file in this way:

create the folder
/wp-content/plugins/wp-w3all-custom
open with a text editor the file
/wp-content/plugins/wp-w3all-phpbb-integration/addons/phpBB_config.php

set values for the following vars so to fit your phpBB db connection

Code: Select all

$phpbb_dbhost = 'localhost';
$phpbb_dbport = ''; # maybe required leave blank if default 3306
$phpbb_dbname = '';
$phpbb_dbuser = '';
$phpbb_dbpasswd = '';

$phpbb_table_prefix = 'phpbb_';
then upload/paste it into the previously created folder
/wp-content/plugins/wp-w3all-custom

Note important: if using the inclusion of the custom phpBB_config.php file, even if some phpBB db connection value is wrong into the plugin admin related fields, the connection to phpBB will result ok (button green).
But if the phpBB_config.php file contain wrong connection values, and exist, then wordpress will fall into the DB fatal error.
No panic, just adjust values to be correct!
To return back using only db connection values stored into the WP db, just remove or rename the file phpBB_config.php.
If the file
/wp-content/plugins/wp-w3all-custom/phpBB_config.php exist it will be used.

NOTE that the option phpBB URL into the
WP_w3all phpBB db connection and main settings
require by the way to be set so to point to the phpBB URL, or links into shortcodes and widgets will result to point to your WP url instead.

Also
NOTE: using the custom file phpBB_config.php

/wp-content/plugins/wp-w3all-custom/phpBB_config.php

DO NOT require the plugin option
- Use custom files to display Last Topics Widgets, Login Widget and Shortcodes
active, it will work anyway even if it is not active.
User avatar
Ezrael
w3 User
w3 User
Posts: 110
Joined: Wed Nov 15, 2023 9:11 pm
Contact:

Re: 2.9.3 release - !IMPORTANT fixes

Post by Ezrael »

Does the update via the WordPress page need any manual inputs or does the update do all steps automatically?
User avatar
axew3
w3all User
w3all User
Posts: 2909
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: 2.9.3 release - !IMPORTANT fixes

Post by axew3 »

It is practically the same file you (maybe) just downloaded into the other post.
Updating to 2.9.3 and having done the required steps to include the custom phpBB config file it will not require any further action.

the folder /wp-content/plugins/wp-w3all-custom is used to keep all custom files that can be used with the plugin, so that when the plugin update occur these files will not be overwritten or loosed.

NOTE: using the custom file phpBB_config.php
/wp-content/plugins/wp-w3all-custom/phpBB_config.php

DO NOT require to activate the plugin option
- Use custom files to display Last Topics Widgets, Login Widget and Shortcodes
It will work anyway even if this option is not active (let add this into the post above)
User avatar
Ezrael
w3 User
w3 User
Posts: 110
Joined: Wed Nov 15, 2023 9:11 pm
Contact:

Re: 2.9.3 release - !IMPORTANT fixes

Post by Ezrael »

I will do some test but the registration ran smoothly! Thank you for help! Give me some days to figure out if everything runs like it should.
Post Reply