Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: ibookdb on March 19, 2008, 02:12:52 PM

Title: SSI.php open basedir restriction in 2.0b3
Post by: ibookdb on March 19, 2008, 02:12:52 PM
I created a file to test SSI.php which works on 1.1.4 but fails in 2.0b3 with this error:

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/data_061e03e3d6d5f3e9c557bebba54e79c1-SMF-modSettings.php) is not within the allowed path(s):

Is there a way to make this work or do I have to change my open_basedir settings? The code in the file is here:

<?php
require_once('SSI.php');
ssi_login();
global $context;
echo $context['user']['id'];
?>
Title: Re: SSI.php open basedir restriction in 2.0b3
Post by: Oldiesmann on March 19, 2008, 02:24:07 PM
Open up Settings.php and make sure this line is in there right below $sourcedir:

$cachedir = $boarddir . '/cache'; # Path to the cache directory.
Title: Re: SSI.php open basedir restriction in 2.0b3
Post by: ibookdb on March 19, 2008, 02:45:40 PM
Thanks, I added that and the warning is gone!