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_';
/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.