{"id":2453,"date":"2016-05-11T14:51:36","date_gmt":"2016-05-11T21:51:36","guid":{"rendered":"http:\/\/www.wellgolly.com\/?p=2453"},"modified":"2016-05-23T09:12:28","modified_gmt":"2016-05-23T16:12:28","slug":"php-warning","status":"publish","type":"post","link":"https:\/\/www.wellgolly.com\/?p=2453","title":{"rendered":"PHP Warning"},"content":{"rendered":"<p>I\u2019ve been getting this warning when I open PhpMyAdmin and since it doesn\u2019t affect anything, I haven\u2019t bothered to fix it.<br \/>\n<pre><code class=\"preserve-code-formatting\">\nPHP Warning:&nbsp;&nbsp;is_readable(): open_basedir restriction in effect. File(js\/codemirror\/lib\/codemirror.js) is not within the allowed path(s): (\/usr\/share\/phpmyadmin\/:\/etc\/phpmyadmin\/:\/var\/lib\/phpmyadmin\/) in \/usr\/share\/phpmyadmin\/js\/get_scripts.js.php on line 31<\/code><\/pre><\/p>\n<p>Today I had some time, so I looked at what might be causing it. By grepping on part of the error message,<br \/>\n<pre><code class=\"preserve-code-formatting\">\n\/usr\/share\/phpmyadmin\/:\/etc\/phpmyadmin\/<\/code><\/pre><br \/>\nI found four files with that text, and more importantly, it was prefixed with <br \/>&#8216;php_admin_value open_basedir&#8217;.<br \/>\nThey were:<br \/>\n<pre><code class=\"preserve-code-formatting\">\n.\/apache2\/conf.d\/phpmyadmin.conf\n.\/apache2\/conf-enabled\/phpmyadmin.conf\n.\/apache2\/sites-available\/wellgolly.com\n.\/apache2\/sites-enabled\/wellgolly.com<\/code><\/pre><br \/>\nI tried adding &#8216;\/usr\/share\/javascript\/&#8217; to the first one and restarting Apache, but that did\u2019t work. Then I added it to the sites-available file and the did the trick. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I\u2019ve been getting this warning when I open PhpMyAdmin and since it doesn\u2019t affect anything, I haven\u2019t bothered to fix it. PHP Warning:&nbsp;&nbsp;is_readable(): open_basedir restriction in effect. File(js\/codemirror\/lib\/codemirror.js) is not within the allowed path(s): (\/usr\/share\/phpmyadmin\/:\/etc\/phpmyadmin\/:\/var\/lib\/phpmyadmin\/) in \/usr\/share\/phpmyadmin\/js\/get_scripts.js.php on line 31 Today I had some time, so I looked at what might be causing it. By &hellip; <a href=\"https:\/\/www.wellgolly.com\/?p=2453\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">PHP Warning<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-2453","post","type-post","status-publish","format-standard","hentry","category-coding"],"_links":{"self":[{"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/posts\/2453","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2453"}],"version-history":[{"count":0,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/posts\/2453\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}