To configure phpBB to set cookie to be available all over the domain (and subdomains), you need to setup cookie domain and path into phpBB ACP in this way:
Open phpBB Admin Control Panel, go under
Server configuration -> Cookie settings
Cookie domain value should be set like the domain name is: so if your site domain is as in this example, axew3.com, the correct value to set is:
in this way cookies become available all over axew3.com and any subdomain like mysubdomain.axew3.com.
Cookie path setting should be set as a single fraction slash: /
If changed cookie setting in phpBB in this way, logout, CLEAN cookies from browser, and re-login.
if on localhost, may leave the value as is. If on subdomain, like myforum.mysite.com, set it as above using only domain name mysite.com)
If you have change these values, Logout, CLEAN cookies from browser, and re-login.
( Older browsers still implementing the deprecated » RFC 2109 may require a leading . (dot) to match all subdomains, so .mysite.com )
NOTE: if cookie setting has been changed to be available over all domain because it was not, then all phpBB users may need to re-login using new board’s cookie settings: in this case, you may would like to force all phpBB users to re-login in case they saved their session cookie with a ‘remember me login’. This can be done by accessing phpBB ACP main page: check for option
Purge all sessions
Purge all sessions. This will log out all users by truncating the session table.
Click the Run now button.
Be sure that the cookie setting is correct before to execute these steps, or you’ll be logged out by your board until you’ll not reset to the correct cookie domain!
mysite.co.uk OR mysubdomain.mysite.co.uk, correct setting will be: mysite.co.uk (while if you are on a subdomain hosting plan like mydomain.myhostingprovider.com, than the setting will be mydomain.myhostingprovider.com, but this is a more rare case)
The following help hint hint here is obsolete as latest patched wp_w3all 1.8.9 version.
from latest patched 1.8.9 plugin version it is just required that the phpBB cookie setting is set correctly to be available over all the domain: then the plugin code will setup correctly at any time the same value for himself in WordPress. The follow is here for reference, but not more useful or needed in effect.
If still in trouble with cookie setting (you can’t login with user via WP login after path to config.php has been setup) follow this step:
just in case, this is the way to fix any problem:
open file wp_w3all.php and +- on top you’ll see these lines:
// Force here the reset of cookie domain (removing the two chars // in front of next line)
// $w3reset_cookie_domain = '.mydomain.com'; // change to fit THE SAME COOKIE DOMAIN SETTING as you have set it in phpBB config. To RESET/force cookie domain setting: remove // chars in front of this line, edit and save, than load any WP page one time. So comment out other time this line re-adding // chars and save.
change the second line, removing the two // in front, so the above become something like (change .domain.com with your domain name)
$w3reset_cookie_domain = '.mydomain.com';
if on localhost, setup as ‘localhost’
save/overwrite the wp_w3all.php file, then test the login. If all ok, then the cookie setting for the plugin is ok now. Re-add the two // slashes in front of the edited line on wp_w3all.php to deactivate it (or remove the line), and save/overwrite the file wp_w3all.php.
Hint/memo: if an user login via phpBB and the cookie setting setup in phpBB ACP is to release the cookie to be valid over all the domain (as above explained), then also if the cookie setting of the plugin is wrong, the user will be correctly auto logged in WordPress when will visits WP side as logged phpBB user, because a valid phpBB cookie to check against will be found.
That’s all here!