1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

open_basedir restriction following update to Panel v11.0.9

Discussion in 'Plesk 11.x for Windows' started by chris.dempsey, Jan 18, 2013.

  1. chris.dempsey

    chris.dempsey New Pleskian

    13
    35%
    Joined:
    Jun 19, 2011
    Messages:
    13
    Likes Received:
    0
    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)
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,539
    Likes Received:
    1,239
    Location:
    Novosibirsk, Russia
    Affiliate:
    https://plesk.com/?a_aid=59ae552b0731c
  3. CFI

    CFI New Pleskian

    15
    85%
    Joined:
    Apr 6, 2011
    Messages:
    9
    Likes Received:
    0
    This does not solve our problem, as we already have the (supposedly) correct settings...
     
  4. chris.dempsey

    chris.dempsey New Pleskian

    13
    35%
    Joined:
    Jun 19, 2011
    Messages:
    13
    Likes Received:
    0
    @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?
     
  5. PaulS82517

    PaulS82517 New Pleskian

    10
     
    Joined:
    Feb 9, 2013
    Messages:
    3
    Likes Received:
    0
    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.
     
  6. chris.dempsey

    chris.dempsey New Pleskian

    13
    35%
    Joined:
    Jun 19, 2011
    Messages:
    13
    Likes Received:
    0
    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.
     
  7. PaulS82517

    PaulS82517 New Pleskian

    10
     
    Joined:
    Feb 9, 2013
    Messages:
    3
    Likes Received:
    0
    Hi, that's great.. can you post the Key just in case ?

    thank you for replying to me..
     
  8. chris.dempsey

    chris.dempsey New Pleskian

    13
    35%
    Joined:
    Jun 19, 2011
    Messages:
    13
    Likes Received:
    0
    Will dig out the screenshot from my notes tomorrow. Any luck and the Plesk Panel option will resolve the issue for you.
     
  9. chris.dempsey

    chris.dempsey New Pleskian

    13
    35%
    Joined:
    Jun 19, 2011
    Messages:
    13
    Likes Received:
    0
    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.
     
  10. InderS

    InderS Silver Pleskian

    15
    30%
    Joined:
    Apr 17, 2013
    Messages:
    968
    Likes Received:
    1
    Location:
    Nashik
    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.
     
Loading...