Jump to content

meta.php open_basedir


Recommended Posts

When i try to change the meta tags in the backend i get this error:

Warning: scandir() [function.scandir]: open_basedir restriction in effect. File(/home/www/web404/html) is not within the allowed path(s): (/home/www/web404/html/:/home/www/web404/phptmp/:/home/www/web404/files/:/home/www/web404/atd/) in /home/www/web404/html/classes/Meta.php on line 50

Warning: scandir(/home/www/web404/html) [function.scandir]: failed to open dir: Operation not permitted in /home/www/web404/html/classes/Meta.php on line 50

Warning: scandir() [function.scandir]: (errno 1): Operation not permitted in /home/www/web404/html/classes/Meta.php on line 50
Cannot scan base URI

It seems to try and scan the variable _PS_ROOT_DIR_ which i believe should be /home/www/web404/html which actually is within the allowed open_basedir paths but it still doesnt work properly anyone seen this before and maybe have a quick fix?

Link to comment
Share on other sites

  • 4 months later...

Hi djoey,

It seems that your server configuration disables the use of base_dir.

Try to place $_SERVER['DOCUMENT_ROOT'] befor you directory


@see disabling-open_basedir-restriction.html

I had the same problem when installing PrestaShop on a Free hosting.

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/prestashop/) is not within the allowed path(s): (/mnt/100/sdc/d/8/***) in /mnt/100/sdc/d/8/***/prestashop/config/config.inc.php on line 26


in file /config/config.inc.php
if (!file_exists(dirname(__FILE__).'/settings.inc.php'))
{
   $dir = ((is_dir($_SERVER['REQUEST_URI']) OR substr($_SERVER['REQUEST_URI'], -1) == '/') ? $_SERVER['REQUEST_URI'] : dirname($_SERVER['REQUEST_URI']).'/');
   if(!file_exists(dirname(__FILE__).'/../install'))
       die('Error: \'install\' directory is missing');
}



I corrected the error like that

is_dir($_SERVER['DOCUMENT_ROOT'].'/'.$_SERVER['REQUEST_URI'])



I hope this will help you

Aurevoir

Link to comment
Share on other sites

  • 1 year later...

LOCAL PrestaShop installed on a server APACHE, when I went and did the settings on a Windows server gave the following message:

PHP Warning:  Unknown: open_basedir restriction in effect. File(C:\Windows\TEMP\) is not within the allowed path(s): (E:\Domains\frinepe.com.br) in Unknown on line 0
PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0
PHP Warning:  Unknown: open_basedir restriction in effect. File(C:\Windows\TEMP\) is not within the allowed path(s): (E:\Domains\frinepe.com.br) in Unknown on line 0
PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0







I did not understand the topic above, what do you want?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...