Forum Moderators: coopster
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.