Trouble with open_basedir

Usually I like to set MySQL connection info away from root
on my server it has always worked fine.
on the same server with PLESK and a new dedicated IP I did set up a new site (named here!)
but it keeps rejecting my include tentative
I need to access from root to

As is:
In php.ini open basedir is commented
there is no ref to open basedir in httppd
I have all access, SSH etc..

what could I do? How can I make it going through?
Error received:
Warning: include() [function.include]: open_basedir restriction in effect.
File(/var/www/vhosts/ is not within the allowed path(s): (/var/www/vhosts/ in /var/www/vhosts/ on line 2

I simplified the include for testing, instead I use:
 realpath($_SERVER['DOCUMENT_ROOT'] . '/../inc_support/') 
 . ini_get ('include_path'));

Open in new window

Who is Participating?
This should resolve your issue. Be sure to backup any files that you are editing.

1. Add file vhost.conf to /var/www/vhosts/YOURDOMAIN/conf folder with the following:

<Directory /var/www/vhosts/YOURDOMAIN/httpdocs/>
<IfModule sapi_apache2.c>
php_admin_value open_basedir none
<IfModule mod_php5.c>
php_admin_value open_basedir none

Open in new window

2. Reload server configuration, either via Plesk admin or through CLI:

/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=yourdomain

Open in new window

Ray PaseurCommented:
I use this statement:


The "uproot" directory is on my server in a parallel universe with the "www" directory that holds the web root.  In my phpinfo() display, open_basedir says "no value."  The behavior of this directive has been changed recently.
array007Author Commented:
Hi Ray,
my info reads:
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Ray PaseurCommented:
Curious... Who is your hosting company?

Have you tried the suggestion from g3nu1n3?  It looks pretty much right to me.
array007Author Commented:
I am with JaguarPC
Yes, I will later try vhosts conf mods

Ray PaseurCommented:
I couldn't find any really strong recommendations when I searched for reviews of JaguarPC, and certainly the strength of tech support is, to my mind, the greatest differentiating factor in choosing a web host.  If you're not "married" to JaguarPC you might consider a different hosting company (in case our suggestions do not get things fixed up for you).  I use and am pleased to recommend for their excellent support.  I have also had good experiences with Hostgator and LiquidWeb.  Some of my colleagues recommend ServerGrove for PHP hosting.  I do not recommend GoDaddy or SiteGround because I have had poor experiences with their technical support.

In any case, best of luck with it! ~Ray
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.