• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

file_exists(): open_basedir restriction in effect

#1
Hello,

i'm running a vServer with Plesk 10.4.4 and Windows Server 2008.

I'm trying to "Import" Add-Ons over my Local File but i'm always getting the "500 Internal Server Error".

I've checked the Server Error Logs and received the following Error:
PHP:
ErrorException: file_exists(): open_basedir restriction in effect. File(C:\Windows\Temp\php9C30.tmp) is not within the allowed path(s): (C:\Inetpub\vhosts\******.org\httpdocs\) - library\Zend\File\Transfer\Adapter\Abstract.php:1285
Due many Tutorials and Tipps on Google i found out that i need to change the Apache Configuration and set "open_basedir" to let XenForo use the Temp folder of my Windows Machine.

Due the fact that i got Plesk it's not that easy to edit/find the vhost.conf and add the Configuration but i think i found the right one under "C:\Inetpub\vhosts\******.org\conf\vhost.conf" and added the follwing code:
Code:
<Directory "C:/inetpub/vhosts/*******.org/httpdocs">
php_admin_value open_basedir "C:/inetpub/vhosts/*******.org/httpdocs;C:/Windows/Temp"
</Directory>
and restarted Plesk and vServer to be sure but i still get the 500 Internal Server Error.

Does anyone have a clue what clould be wrong ?

I hope i am in the right section and thank you in advance !

-Doug Heffernan
 

Jake Bunce

XenForo moderator
Staff member
#2
You need to relax the open_basedir setting in your PHP configuration on your server so it includes that Temp directory.
 
#3
Hello,
that was the first step i tried but due googling they said that you need to set it in apache to "overwrite" the php.ini setting.

Anyways, in my php.ini i've removed the semicolon from open_basedir and added the following:
Code:
open_basedir = "C:\Windows\Temp\;C:\Inetpub"
Which also don't work.

Thanks in advance.
 

Jake Bunce

XenForo moderator
Staff member
#4
Looks correct to me (for a Windows server which uses semicolons to delimit multiple paths here). Did you restart PHP and/or IIS/Apache after making the change?
 

Jake Bunce

XenForo moderator
Staff member
#6
Well if the error persists then obviously the change is not taking effect. Maybe you are not editing the correct php.ini file. Sometimes a server will have multiple such files. You need to find the correct one which should be specified in the phpinfo:

admin.php?tools/phpinfo
 
#7
Hello,
well i've restarted the whole vServer and edited the right php.ini which is located in "C:\Parallels\Plesk\Additional\PleskPHP53" and phpinfo outputs:
Code:
Loaded Configuration File    C:\Parallels\Plesk\Additional\PleskPHP53\php.ini
but thanks anyways , i will try to change some slashes or semicolons and play a bit with it maybe i'll find it out and write back !

-Doug Heffernan
 
#8
Hello,
i've finally found the solution which is like always the easiest ^^

For everyone others who got this Problem and using Plesk:
When you create a User/Domain you need to create a subscription and in there you can costumize the PHP Settings for only this subscription where is also open_basedir.

Works now !

Thanks for your help Jake Bunce !

-Doug Heffernan