{"id":794,"date":"2016-03-04T11:12:48","date_gmt":"2016-03-04T10:12:48","guid":{"rendered":"http:\/\/www.axew3.com\/w3\/?p=794"},"modified":"2024-05-29T12:37:16","modified_gmt":"2024-05-29T10:37:16","slug":"how-to-disable-open_basedir-for-subdomain-file-inclusion","status":"publish","type":"post","link":"https:\/\/www.axew3.com\/w3\/2016\/03\/how-to-disable-open_basedir-for-subdomain-file-inclusion\/","title":{"rendered":"Apache: disable open_basedir on php.ini<br \/>for subdomains file inclusion"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>On subdomains installations<\/strong> if the configuration php.ini file of PHP, have the <strong>open_basedir<\/strong> directive active, wp_w3all will not include the necessary phpBB config file, because files inclusions are restricted to the directory assigned by open_basedir in the server, and the phpBB config file inclusion from another directory (that are in this case domain or subdomain) won&#8217;t work.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To let wp_w3all include the config file between domains and subdomains on your server, you need to <strong>comment off <\/strong>the open_basedir in your php.ini in this way:<br><strong>;open_basedir = &#8230;<br><\/strong><br>and restart Apache<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">or in apache httpd.conf add something like:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;Directory \/var\/www\/vhosts\/domain.tld\/httpdocs&gt;\nphp_admin_value open_basedir none\n&lt;\/Directory&gt;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>On online servers you need to edit the php.ini file under your domain control panel:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&#8220;my host uses Odin\/plesk hosting software and through that i found a phpsetting tab, allowing me to change open_basedir.<br>changed from:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>{DOCROOT}{\/}{:}{TMP}{\/}<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">to<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>{WEBSPACEROOT}{\/}{:}{TMP}{\/}<\/em><br>and that solved it.&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>NOTE about security implications: it is assumed here, that you know what it mean about the security, if the server&#8217;s folders aren&#8217;t all under the control of the same user.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>On subdomains installations if the configuration php.ini file of PHP, have the open_basedir directive active, wp_w3all will not include the necessary phpBB config file, because files inclusions are restricted to the directory assigned by open_basedir in the server, and the phpBB config file inclusion from another directory (that are in this case domain or subdomain) [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[61],"tags":[63,66,65],"class_list":["post-794","post","type-post","status-publish","format-standard","hentry","category-server-related","tag-disable-open_basedir-subdomain-for-file-inclusion","tag-how-to-disable-open_basedir","tag-subdomain-file-inclusion-error"],"_links":{"self":[{"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/posts\/794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/comments?post=794"}],"version-history":[{"count":3,"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/posts\/794\/revisions"}],"predecessor-version":[{"id":8026,"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/posts\/794\/revisions\/8026"}],"wp:attachment":[{"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/media?parent=794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/categories?post=794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/tags?post=794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}