• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

PHP open_basedir (local) setting overwritten for vhosts

D

doughty

Guest
I've done a few hours of searching last night, and have not been success with any of the methods listed.

I need the local php setting (open_basedir) on $DOMAIN$ to be set as null, or even changed at all.

I am being virtually hosted on a CentOS running Parallels 10.0.1.

I also have root access on the virtual host.

I tried creating '/var/www/vhosts/$DOMAIN$/conf/vhost.conf' and then running httpdmng --reconfigure-domain $DOMAIN$, as opposed to the deprecated(?) websrvmng rebuilding.

<Directory /var/www/vhosts/$DOMAIN$/httpdocs>
admin_php_value open_basedir none
</Directory>

Restarted the server, yet the local value of the php variable open_basedir is still set. The global is null as intended.

Let me know if there's anything I'm doing wrong, or if more information would be of more use to help.

Thanks for reading, and I know this has been posted before, but like I mentioned, have still been unsuccessful.

Best,
John Doughty
 
Maybe you need to fix vhost.conf: "admin_php_value" should be replaced with "php_admin_value"
 
That was just a typo of my recollection of it. You are correct in that it should be php_admin_value. Thanks for the reply!

---------------

I solved the problem:

Actually, the issue was that Plesk overrides /etc/php.ini with a template stored in /usr/local/psa/admin/conf/templates/default/service/php.ini

So, I commented out where they where specifying the php_admin_value open_basedir {LOCATION}:TMP

vi /usr/local/psa/admin/conf/templates/default/service/php.ini

After saving, I had to reconfigure server with the following command:

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

There are other options with httpdmng (which has replaced websrvmng apparently), use the -h parameter to list them.

Hope this helps anyone else in the same boat. Msg me if you hae any other questions.

ciao
 
Great Solution! Had this problem myself, spent an entire day trying to fix it until I read this post.

But the actual file (on my system at least) is

/usr/local/psa/admin/conf/templates/default/service/php.php

I just added the folders I needed included, then reloaded. BAM!! it works.
 
didnt work

Didnt work for me, I edited the /usr/local/psa/admin/conf/templates/default/service/php.ini file, but there was not any line related with open_basedir :-/
 
Back
Top