Loading bootstrap.inc in external PHP file in a subdirectory
The bare minimum required is:

define('DRUPAL_ROOT', '/var/www/vhosts/mysite.com/httpdocs/');
$_SERVER['HTTP_HOST'] = 'mysite.com';
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);


If you don't want to fully bootstrap and only get the session, see the technique defined in Getting the current user without bootstrapping to DRUPAL_BOOTSTRAP_SESSION