I have a website with a phpBB3-forum and a MODx-CMS, looking like:
phpBB:
mydomain/forums/
MODx:
mydomain/modx/
I’d like to place some information about the forum (latest topics, whosonline, etc) on a sidepanel in the MODx-part. For that, I made a php-file wich starts with:
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../forums/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
//further stuff
When I call that file directly (pointing the browser to
mydomain/modx/assets/site/page.php) I get a perfect result. But when I include it in a snippet (literally using a php-include for the moment) it results in this error:
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: include() [function.include]: open_basedir restriction in effect. File(../../../forums/common.php) is not within the allowed path(s): (/home/swordfac:/usr/lib/php:/usr/local/lib/php:/tmp)
Error type/ Nr.: Warning - 2
File: /home/swordfac/public_html/modx/assets/site/last_topics.php
Line: 11
Line 11 source: include($phpbb_root_path . 'common.' . $phpEx);
Parser timing
MySQL: 0.0011 s (3 Requests)
PHP: 0.0238 s
Total: 0.0249 s
"Not within the allowed path(s)" apperently. I’m guessing that relates to that it connects with files outside MODx? Could someone inform me on how to solve that?