Forum Moderators: coopster

Message Too Old, No Replies

Warning: RarEntry::extract() [rarentry.extract]: open basedir restrict

         

topwebdesigns

8:10 pm on Nov 3, 2009 (gmt 0)

10+ Year Member



This has been causing me problems for two days now. I've done everything Google has told me to do and Googling for that exact error brings me absolutely no results, so I find myself stuck.

I've got a slightly more complicated script which I won't explain as i'm getting these exact same problems with my dummy script as well, so I figure if one can be fixed they'll both work.

Here's my dummy script:

$rar_file = rar_open("/var/www/vhosts/mydomain.com/httpdocs/test.rar");
$rar_list = rar_list($rar_file);
foreach($rar_list as $file) {
$entry = rar_entry_get($rar_file, $file->name);
$entry->extract(false,"/var/www/vhosts/mydomain.com/httpdocs/testing/".$file->name);
}

Pretty simple right? However I get this error:

Warning: RarEntry::extract() [rarentry.extract]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/mydomain.com/subdomains/dev/httpdocs:/var/www/vhosts/mydomain.com/subdomains/old/httpdocs:/var/www/vhosts/mydomain.com/httpdocs:/var/www/vhosts/mydomain.com/tmp:/tmp) in /var/www/vhosts/mydomain.com/httpdocs/testfile.php on line 6

And the extract doesn't actually work.

The contents of my conf file is the following: (as suggested when Googling my problem)

<Directory /var/www/vhosts/mydomain.com/httpdocs>
AllowOverride All
php_admin_flag engine on
php_admin_value open_basedir "/var/www/vhosts/mydomain.com/subdomains/dev/httpdocs:/var/www/vhosts/mydomain.com/subdomains/old/httpdocs:/var/www/vhosts/mydomain.com/httpdocs:/var/www/vhosts/mydomain.com/tmp:/tmp"
</Directory>

Can anyone suggest any reason why this would be happening? My site has been down for over 48 hours now for what was supposed to be a 3 hour upgrade.

Tommybs

12:29 pm on Nov 4, 2009 (gmt 0)

10+ Year Member



Does the folder /testing/ have the appropriate permissions (e.g write access etc?) Have you tried adding the /testing/ folder to the conf?

Just some suggestions that might help diagnose where the problem lies.