Jump to content


Photo

ERROR: require_once()

require_once()

  • Please log in to reply
1 reply to this topic

#1 simplehuman

simplehuman

    Newbie

  • New Members
  • Pip
  • 1 posts

Posted 23 February 2013 - 01:58 AM

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, 23 February 2013 - 02:00 AM.


#2 mweldan

mweldan

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 08 March 2013 - 03:50 PM

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\






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com