• I’m wondering if there’s a way to re-use WordPress for session management outside of WordPress itself — the same way you could with PHPBB by including this little snippet of code:

    <?php
    	define('IN_PHPBB', true);
    	$phpbb_root_path = '../phpbb/';
    	include($phpbb_root_path . 'extension.inc');
    	include($phpbb_root_path . 'common.'.$phpEx);
    
    	$userdata = session_pagestart($user_ip, PAGE_INDEX);
    	init_userprefs($userdata);
    ?>

    I’ve looked round the forums for a while now but haven’t found any mention of a similar trick, I’ve long dumped the phpBB forum itself, but have had to keep it around as the rest of the site uses it for session management — would love to bring that function over to WordPress if at all possible.

Viewing 1 replies (of 1 total)
  • Hello,
    I’m searching for this too.

    The only way I found is to load wp inside your script, without showing it.
    You have to inlucde wp-blog-header.php with WP_USE_THEMES se to false.

    I din’t try it already because it is not a solution for me..
    The scripts that I have to run are cpu-consuming.. loading the entire wp just for the username is uneconomical.

Viewing 1 replies (of 1 total)

The topic ‘Re-using WordPress session outside of WordPress’ is closed to new replies.