• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

open_basedir restriction following update to Panel v11.0.9

chris.dempsey

New Pleskian
We had our server updated from v9.5.4 to v11.0.9 recently and PHP websites that were running fine on PHP 5.2.17 FastCGI are now failing when trying to include files eg. require_once('include.txt'); throws error:

PHP Warning: require_once(): open_basedir restriction in effect. File(include.txt) is not within the allowed path(s): (C:/inetpub/vhosts//website.co.uk\;C:\Windows\Temp\) in C:\inetpub\vhosts\website.co.uk\subdomains\mali\httpdocs\claymore-api\index.php on line 12


open_basedir value in the PHP settings tab is: {WEBSPACEROOT}\;{TMP}\

Can anyone advise what I can look at to resolve this? We paid Parallels to perform the update but they will not look at this on the same support ticket (even though the issue was caused by the update).

Environment:
- Windows Server 2008 R2 64bit
- Plesk Panel 11.0.9
- PHP 5.2.17 and 5.3.19 via FastCGI (no issue when via CGI)
 
This does not solve our problem, as we already have the (supposedly) correct settings...
 
@Igor: http://forum.parallels.com/showthread.php?t=258036
I had seen this thread already (should have said this in my original post) but specifying the path to the root directory of the website eg. E:\inetpub\vhosts\xyz.com\httpdocs\; in the open_basedir setting did not correct the issue so I set it back to the default {WEBSPACEROOT}\;{TMP}\

While testing I found that getcwd() reports C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP53 which is the PHP 5.3 installation directory when it should report the current working directory eg. E:\inetpub\vhosts\xyz.com\httpdocs\

One other thing to note, although I don't think it should matter, is that I'm testing on a sub domain eg. E:\inetpub\vhosts\xyz.com\subdomains\mali\httpdocs\

I did find a workaround by right clicking the root directory > properties > security and adding the relevant IUSR_ account and allowing 'list folder contents'.

I do not know why this works and note that domains created before the update from Plesk Panel 9.5.4 to 11.0.9 do not have specific permissions listed for the IUSR_ account, older entries have none of the permissions selected for IUSR_.

This workaround is not practical as our resellers do not have access to the server over RDP to perform this task and really we need to fix whatever is broken, as the permissions should be set correctly when the website is created.

Can anyone suggest why the relevant IUSR_ account is not added to the root directory when a new sub domain is created?
 
I too am having the very same issue with my sites.. also running on Plesk 11.0.9.. it's very frustrating.. and causing me to loose customers !

someone from Parallels must have come across this problem during testing ?

Is this a Parallels issues, or how the host company has setup my VPS ?


I need some kind of answer so i can report back to my hosting company.
 
I'm sure we fixed this by disabling the open_basedir form registry, clear the current value. I don't have access to the relevant registry key name from here but can post it tomorrow if you need. Plesk 11 stores some domain specific settings in the registry. It may do the same if you navigate to the PHP settings tab for the domain with the issue and set the open_basedir parameter as "none".

In order to create a new domain without open_basedir restriction, try to edit the default service plan "hosting settings", open_basedir as "None". So that it will not affect the newly created domain.

Hope this helps some.
 
In the Registry Editor navigate to:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Notde\PHP\Per Directory Values\C\inetpub\vhosts\yourdomain.co.uk\httpdocs

Open the open_basedir entry and remove the current value. As far as I understand this is equivalent to using the Plesk Panel to set open_basedir to 'none'.

Will be interested to hear back if that works for you.
 
In latest plesk you get option to disable open base dir for particular domain. For that you will need to go to domain >> website domains >> click on domain >> php settings in that you will find open base dir. Select none to disable it.
 
Back
Top