Results 1 to 11 of 11

Thread: how to change php "open_basedir" in Plesk 10.4.4?

  1. #1
    Bit Poster
    Join Date
    Apr 2012
    Posts
    3

    Thumbs down how to change php "open_basedir" in Plesk 10.4.4?

    I've multiple sites I need to run off one host. they all share a library folder or two. I've been copying each one into /var/www/vhost/[HOSTNAME]/httpdocs as w workaround for the fact I cannot set things up for all the sites to use a single shared copy.

    I know I need to modify "open_basedir" but I've been unable to find the right place to change "open_basedir" either manually on disk or in the plesk web UI. I've seen many users having this issue, numerous complaints about it, and it seems Plesk likes to move this particular setting around pretty frequently.

    pertinent plesk doc:
    http://download1.parallels.com/Plesk...Name=69696.htm

    relevant user thread I've found:
    http://forum.parallels.com/showthrea...t=open_basedir

    [NOTE: there were many user threads with this problem, but none of the rest were valid as they spoke of solutions referencing earlier/ different versions of plesk and none of them were relevant to 10.4.4]

    I finally found the setting buried/obfuscated/ hidden here:
    plesk -> server -> simple view settings -> PHP settings -> open_basedir

    I tried adding my new path, no job. restarted apache, no joy. even found a reference to this..

    /usr/local/psa/admin/bin/httpdmng --reconfigure-all

    .. ran that after every change. no joy.

    in desperation I dumped the shared folder into /tmp/library to see if it would work, and it did.

    out of frustration and curiosity, I decided to modify open_basedir in the GUI and break it. I changed

    "{DOCROOT}/:/tmp/" to "{DOCROOT}/:/tmp2/"

    .. restarted apache, reconfigure-all, etc. and IT STILL worked.

    so Mr Plesk/Parallels support people, either I'm missing something obvious, or your product appears to be very broken here.



  2. #2
    Product Expert Sergey L's Avatar
    Join Date
    Aug 2006
    Posts
    949

    Default

    I think you needed to click site name at "Websites & domains", go to "PHP Settings" and then setup proper value for your "open_basedir". Maybe it needs better discovery, but the document you are referring to mentions that (http://download1.parallels.com/Plesk/PP10/10.4/Doc/en-US/online/plesk-administrator-guide/index.htm?fileName=69696.htm ). You could also click "Website scripting and security" and then go to "PHP settings"

    What you have tuned in "Simple View" settings would only apply if you were in the Simple View (and I think you aren't).

    Hope that helps.
    Regards



  3. #3
    Bit Poster
    Join Date
    Apr 2012
    Posts
    3

    Default

    hi Sergey, thanks for your response.

    you said..
    ' I think you needed to click site name at "Websites & domains", go to "PHP Settings" and then setup proper value for your "open_basedir". '

    I navigated to "Websites & Domains", but the only site listed is the main server itself. none of my sub/domains are there, but I see my sub/domains in the "Webspaces" tab.

    did I create my sites incorrectly? do they need to be listed where you mentioned?



  4. #4
    Bit Poster
    Join Date
    Apr 2012
    Posts
    3

    Default

    got an update for you..

    I realized I needed to choose the site from the dropdown list at the top of the page under "Webspace". I selected the right site and was able to get to "Websites & domains" -> [domain name] -> "PHP settings", and examine the "open_basedir" setting.

    I was able to get my files to read **outside** a restricted set of dirs by explicitly setting open_basedir to "none". you cannot leave it empty, you must set the text "none".

    EDIT - I got this to work for my subdomain, yay

    note I really couldn't wrap my head around that doc link that describes the hierarchy of settings - it would be helpful if it actually described where the different settings can be found. i.e. where are "Service plan" php settings accessed? where are "Add-on plan" php settings accessed? where are "Subscriptions php settings" accessed? etc.
    Last edited by cc1234; May 8, 2012 at 08:34 PM. Reason: changed status - I got it working, kinda



  5. #5
    Bit Poster
    Join Date
    Jun 2012
    Posts
    1

    Default Open base_dir headache

    After moving my VPS to plesk I am getting open_base dir restrictions errors. I need to disable open_basedir in my subdomain. CC1234, how did you do to setup open_basedir "none" in plesk panel?

    In php setting I see:
    open_basedir:
    Default
    {DOCROOT}/:/tmp/
    Enter custom value

    to setup the open_basedir to none, I assume I have to choose Enter custom value. What's the value I am suppose to place there?

    I put the following in the custom value field:
    open_basedir none = didn't work.
    open_basedir "none" didn't work.
    none = didn't work
    "none" didn't work.

    Please help, this open_basedir is getting me crazy.

    THank you,

    Kobyn



  6. #6
    Kilo Poster
    Join Date
    May 2012
    Posts
    13

    Default

    read this

    http://forum.parallels.com/showthread.php?t=259730

    they knows about the error but do nothing
    my server dont work 6 weeks now - the best way is you move to Cpanel
    Juliusz



  7. #7
    Product Expert Sergey L's Avatar
    Join Date
    Aug 2006
    Posts
    949

    Default

    Hi kobynk,

    Hard to tell why "none" works for some servers and doesn't for others - perhaps that may depend on PHP version installed. The following can be suggested to you:
    1) set open_basedir to "{WEBSPACEROOT}:/tmp/" - while it doesn't make open_basedir comletely disabled, this setting will make your site able to include files from any other folder in your space, which should be enough for most cases
    2) upgrade to Plesk 11 at http://parallels.com/download/plesk/11 - it is in pre-release phase and includes pre-configured "none" option for open_basedir (simply choose in dropdown menu). This one would completely disable open_basedir for your site

    Regards



  8. #8
    Kilo Poster
    Join Date
    Sep 2012
    Location
    Spain
    Posts
    12

    Default Disable open_basedir

    Hi,
    I run a magento website on my 1&1 VPS running plesk 10.4 . I wanted to disable open_basedir because it is said that improves the performance of websites based on Magento. As it seems to be a issue with this procedure on plesk 10.4, I update to plesk 11.09. But I the problems is still present.

    I cant set open_basedir to "none", or disable it through php.

    Please give me a solution
    Attached Images Attached Images



  9. #9
    Kilo Poster
    Join Date
    Sep 2012
    Location
    Spain
    Posts
    12

    Default just found the solution

    The only solution which worked for me was:

    To modify this setting, create a vhost.conf file in your /var/www/vhosts/domain.com/conf/ directory, and enter the following lines:

    <Directory /var/www/vhosts/domain.com/httpdocs>
    php_admin_value open_basedir /path/you/require:/another/path/you/require
    </Directory>

    Then

    /usr/local/psa/admin/sbin/httpdmng --reconfigure-all


    http://support.godaddy.com/help/arti...ls-plesk-panel



  10. #10
    Kilo Poster
    Join Date
    Sep 2008
    Posts
    26

    Default

    Hello,

    This error happen to me and i found a solution.

    Check the files /opt/psa/admin/conf/vhosts_bootstrap.conf* because can be included 2 times 2 diferent configurations of the same domain.

    I edit this file and delete the old file that was duplicate, restart apache and works for me.

    Jose J. Anton



  11. #11
    Kilo Poster
    Join Date
    Apr 2012
    Posts
    10

    Default

    I find if 'none' doesn't work I just use a slash to specify it as root.
    always change it in php settings tab in plesk I never put it elsewhere as plesk will just overwrite it anyway.

    so I use
    /
    or
    /var/



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •