• 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

how to change php "open_basedir" in Plesk 10.4.4?

C

cc1234

Guest
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/Ples...inistrator-guide/index.htm?fileName=69696.htm

relevant user thread I've found:
http://forum.parallels.com/showthread.php?t=113236&highlight=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.
 
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
 
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?
 
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 a moderator:
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
 
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
 
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
 

Attachments

  • main panel.png
    main panel.png
    70 KB · Views: 32
  • open_basedir.png
    open_basedir.png
    51.9 KB · Views: 33
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/article/1619/can-i-use-openbasedir-on-my-server-running-parallels-plesk-panel
 
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
 
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/
 
Back
Top