My folder structure:
www.domain.com/myscript.php
www.domain.com/blog/wp-load.php
www.domain.com/blog/bridge.php
Bridge.php:
include('wp-config.php');
include('wp-includes/pluggable.php');
echo $current_user->user_login;
Opening this file manually in my browser correctly output the current logged in username. The problem is that i also need the username in myscript.php which is in the parent folder, outside wordpress install
myscript.php is just:
include("blog/bridge.php");
I have tried everything i could think of: - installed the plugin "root cookie" to enable cookies outside installation dir - if i check firefox cookies, it is correctly set to "/" and not to "/blog" - also the following is set is wp-config.php: define('SITECOOKIEPATH','/'); define('ADMIN_COOKIE_PATH','/'); - tried including different wordpress core files - setting paths including the filesystem root doesn't change anything - including the wordpress files in myscript.php instead of bridge.php doesn't help