<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>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.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> James [mailto:james@slor.net] <br><b>Sent:</b> Monday, August 12, 2013 10:18 AM<br><b>To:</b> BlueOnyx General Mailing List (blueonyx@mail.blueonyx.it)<br><b>Subject:</b> Subdomains not getting correct open_basedir value<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have a main domain, <a href="http://www.domain.com">www.domain.com</a>, which is site10 in BX.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Here is the server-wide open_basedir setting as noted in the server-wide PHP settings page:<o:p></o:p></p><p class=MsoNormal>    /tmp/<o:p></o:p></p><p class=MsoNormal>    /usr/sausalito/configs/php/<o:p></o:p></p><p class=MsoNormal>    /var/lib/php/session/ <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>And in the Server area on the site management page for <a href="http://www.domain.com">www.domain.com</a>:<o:p></o:p></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:black;background:#F7FAFF'><o:p> </o:p></span></p><p class=MsoNormal>    /home/.sites/48/site10<o:p></o:p></p><p class=MsoNormal>    /tmp/<o:p></o:p></p><p class=MsoNormal>    /usr/sausalito/configs/php/<o:p></o:p></p><p class=MsoNormal>    /var/lib/php/session/<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have nothing in the Vsite-specific area.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The site10 httpd config file has this line:<o:p></o:p></p><p class=MsoNormal>    php_admin_value open_basedir /var/lib/php/session/:/usr/sausalito/configs/php/:/tmp/:/home/.sites/48/site10/<o:p></o:p></p><p class=MsoNormal>In my index.php under <a href="http://www.domain.com">www.domain.com</a>, I have a “require(‘dblogon.php’).  It works just fine.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I moved the same code to a new subdomain links.domain.com, and site10.links.com contains this line:<o:p></o:p></p><p class=MsoNormal>    php_admin_value open_basedir /usr/sausalito/configs/php/:/home/.sites/48/site10/<o:p></o:p></p><p class=MsoNormal>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.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>When I access the subdomain site, I get a server error and this in the error_log:<o:p></o:p></p><p class=MsoNormal>    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<o:p></o:p></p><p class=MsoNormal>The allowed path noted in the error message is exactly what’s in the main php.ini on the server.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks for any input!<o:p></o:p></p><p class=MsoNormal>James<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>