[BlueOnyx:13527] Re: Subdomains not getting correct open_basedir value
James
james at slor.net
Tue Aug 13 11:25:47 -05 2013
Perhaps this is a known side-effect when using suPHP with subdomains. I
added a php.ini to the sub with the directives I need, and that took care of
the override.
From: James [mailto:james at slor.net]
Sent: Monday, August 12, 2013 10:18 AM
To: BlueOnyx General Mailing List (blueonyx at mail.blueonyx.it)
Subject: Subdomains not getting correct open_basedir value
Hey folks - maybe one you guys can help me solve quickly. It seems that the
site-level open_basedir value is not getting through for subdomains on my
installation. This is a 5108R install. Here's an example:
I have a main domain, www.domain.com, which is site10 in BX.
Here is the server-wide open_basedir setting as noted in the server-wide PHP
settings page:
/tmp/
/usr/sausalito/configs/php/
/var/lib/php/session/
And in the Server area on the site management page for www.domain.com:
/home/.sites/48/site10
/tmp/
/usr/sausalito/configs/php/
/var/lib/php/session/
I have nothing in the Vsite-specific area.
The site10 httpd config file has this line:
php_admin_value open_basedir
/var/lib/php/session/:/usr/sausalito/configs/php/:/tmp/:/home/.sites/48/site
10/
In my index.php under www.domain.com, I have a "require('dblogon.php'). It
works just fine.
I moved the same code to a new subdomain links.domain.com, and
site10.links.com contains this line:
php_admin_value open_basedir
/usr/sausalito/configs/php/:/home/.sites/48/site10/
I'm curious why that link doesn't exactly match the site-level link, but I'm
not too worried about that one because the session directory is included in
the server-wide settings.
When I access the subdomain site, I get a server error and this in the
error_log:
PHP Warning: file_exists(): open_basedir restriction in effect.
File(dblogon.php) is not within the allowed path(s):
(/tmp/:/usr/sausalito/configs/php/:/var/lib/php/session/) in
/home/.sites/48/site10/vhosts/links/index.php on line 3
The allowed path noted in the error message is exactly what's in the main
php.ini on the server.
So, have I missed an obvious step here? It seems like the necessary line is
there to include /home/.sites/48/site10/ and its child directories in
open_basedir, but it doesn't appear that any of the php_admin_value
directives from the subdomain include file are being honored. Another
directive in there turns on register_globals for just this site, and that
also is not honored for the subdomain.
Thanks for any input!
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20130813/dfe779ab/attachment.html>
More information about the Blueonyx
mailing list