Jump to content

ERROR: require_once()


simplehuman

Recommended Posts

Dear PHP Experts,

 

I have hosting account which I access with FileZilla or Parallel Plesk. I installed a third party script and and experiencing the following problem:

 

Warning: require_once() [function.require-once]: open_basedir restriction in effect. File(C:\/httpdocs/smarty/libs/Smarty.class.php) is not within the allowed path(s): (C:/Inetpub/vhosts/liberty.pk\;C:\Windows\Temp\) inC:\Inetpub\vhosts\liberty.pk\httpdocs\include\config.php on line 29

 

Warning: require_once(/httpdocs/smarty/libs/Smarty.class.php) [function.require-once]: failed to open stream: Operation not permitted in C:\Inetpub\vhosts\liberty.pk\httpdocs\include\config.php on line 29

 

Fatal error: require_once() [function.require]: Failed opening required '/httpdocs/smarty/libs/Smarty.class.php' (include_path='.;./includes;./pear') in C:\Inetpub\vhosts\liberty.pk\httpdocs\include\config.php on line 2I

 

I tried to look for vhost.conf file but could not find it then thought of making a new file (vhost.conf) but where should I upload it.

 

 

 

 

The following is the code of config file:

 

 

 

<?

$config = array();

 

// Begin Configuration

$config['basedir'] = '/httpdocs';

$config['baseurl'] = 'http://www.liberty.pk';

 

$DBTYPE = 'mysql';

$DBHOST = 'localhost';

$DBUSER = 'userdbone';

$DBPASSWORD = '****';

$DBNAME = 'dbone';

 

$default_language = "english"; //Valid choices are english, spanish, french, portuguese or hebrew

// End Configuration

 

session_start();

date_default_timezone_set('America/New_York');

 

$config['adminurl'] = $config['baseurl'].'/administrator';

$config['cssurl'] = $config['baseurl'].'/css';

$config['imagedir'] = $config['basedir'].'/images';

$config['imageurl'] = $config['baseurl'].'/images';

$config['pdir'] = $config['basedir'].'/pics';

$config['purl'] = $config['baseurl'].'/pics';

$config['membersprofilepicdir'] = $config['imagedir'].'/membersprofilepic';

$config['membersprofilepicurl'] = $config['imageurl'].'/membersprofilepic';

 

require_once($config['basedir'].'/smarty/libs/Smarty.class.php');

require_once($config['basedir'].'/libraries/mysmarty.class.php');

require_once($config['basedir'].'/libraries/SConfig.php');

require_once($config['basedir'].'/libraries/SError.php');

require_once($config['basedir'].'/libraries/adodb/adodb.inc.php');

require_once($config['basedir'].'/libraries/phpmailer/class.phpmailer.php');

require_once($config['basedir'].'/libraries/SEmail.php');

 

Your guidance shall be appreciated!

 

Simplehuman

Edited by simplehuman
Link to comment
Share on other sites

  • 2 weeks later...

First error message says it all:

 

Warning: require_once() [function.require-once]: open_basedir restriction in effect. File(C:\/httpdocs/smarty/libs/Smarty.class.php) is not within the allowed path(s): (C:/Inetpub/vhosts/liberty.pk\;C:\Windows\Temp\) inC:\Inetpub\vhosts\liberty.pk\httpdocs\include\config.php on line 29

 

update your open_basedir setting in php.ini to allow these path:

C:/Inetpub/vhosts/liberty.pk\;C:\Windows\Temp\

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.