{"id":367,"date":"2013-03-05T17:44:13","date_gmt":"2013-03-05T09:44:13","guid":{"rendered":"http:\/\/www.sulabs.net\/?p=367"},"modified":"2013-03-05T17:44:45","modified_gmt":"2013-03-05T09:44:45","slug":"ecshop%e6%8f%90%e7%a4%baopen_basedir-cls_template-php-on-line-1182-%e9%94%99%e8%af%af%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.sulabs.net\/?p=367","title":{"rendered":"ECShop\u63d0\u793aopen_basedir cls_template.php on line 1182 \u9519\u8bef\u89e3\u51b3\u65b9\u6cd5"},"content":{"rendered":"<p>\u6700\u8fd1\u5e2e\u4e00\u670b\u53cb\u8c03\u8bd5\u7ad9\u70b9\uff0c\u4f7f\u7528CentOS\uff0c\u91cd\u65b0\u914d\u7f6e\u4e86\u7cfb\u7edf\u73af\u5883\uff0c\u8dd1ECShop\u7a0b\u5e8f\uff0c\u5728\u5f00\u542fPHP.ini \u7684 open_basedir \u53c2\u6570\u9650\u5b9a\u7ad9\u70b9\u76ee\u5f55\u6743\u9650\u540e\uff0cECShop \u8fd0\u884c\u7f51\u9875\u5934\u90e8\u63d0\u793a\u5982\u4e0b\u9519\u8bef:<br \/>\nWarning: include() [function.include]: open_basedir restriction in effect. File() is not within the allowed path(s): (\/tmp\/:\/var\/tmp\/:\/data\/web\/xxxxx ) in \/data\/web\/xxxxx\/includes\/cls_template.php on line 1182<br \/>\n<!--more--><\/p>\n<p>\u5c1d\u8bd5\u4f7f\u7528Discuz\u7b49\u5176\u5b83\u5f00\u6e90\u7a0b\u5e8f\u6d4b\u8bd5\uff0c\u53caWin\u4e0b\u7528IIS\u6d4b\u8bd5\uff0c\u5374\u6ca1\u8fd9\u4e2a\u95ee\u9898\uff0c\u548c\u670b\u53cb\u4e00\u8d77\u6539\u52a8\u4e86\u4e0bECShop\u7684\u4ee3\u7801\uff0c\u5c4f\u853d\u6389\u7a0b\u5e8f\u4e2d\u7684\u9519\u8bef\u6c47\u62a5\uff0c\u540c\u65f6\u7981\u7528\u4e86\u7f13\u5b58\u7f16\u8bd1\u6587\u4ef6\u540e\uff0c\u4f3c\u4e4e\u6b63\u5e38\u4e86\u3002\u4e8b\u540e\u53c8\u7814\u7a76\u4e86\u4e0b\uff0c\u53d1\u73b0\u539f\u6765\u662feAccelerator \u52a0\u901f\u5668bug\u5bfc\u81f4\u7684\uff0c\u96c6\u4e2d\u5728 0.9.6.* \u7248\u672c\uff0c\u5e76google\u5230\u89e3\u51b3\u65b9\u6cd5\u3002<\/p>\n<p>\u65b9\u6cd51.<br \/>\n\u5bf9\u4e8e eaccelerator 0.9.6.* \u7248\u672c\u5728linux \u4e0b\u7f16\u8bd1\u65f6\u52a0\u4e0a\u4ee5\u4e0b\u53c2\u6570\uff0c\u7981\u7528inode<br \/>\n-without-eaccelerator-use-inode<br \/>\nDon't use inodes to determine hash keys. This is turned off by default in win32 because it doesn't use inodes. If disabled md5 is used to hash the filenames, which adds extra overhead.<br \/>\n\uff08\u4e0d\u4f7f\u7528inode \u6765\u5224\u65adHash\u952e\uff0c\u9ed8\u8ba4\u5728Win32\u4e2d\u662f\u5173\u95ed\u7684\uff0c\u56e0\u4e3a\u4e0d\u9700\u8981\u4f7f\u7528inodes,\u5982\u679c\u7981\u7528MD5\u7528\u4e8eHash\u6587\u4ef6\u540d\uff0c\u5c06\u4f1a\u589e\u52a0\u4e00\u4e9b\u989d\u5916\u5f00\u9500\uff09<br \/>\n\u56e0\u6b64\u5728Win\u670d\u52a1\u5668\u4e0a\u5e76\u6ca1\u9047\u5230\u8fd9\u7c7b\u95ee\u9898\u3002<\/p>\n<p>\u65b9\u6cd52:<br \/>\n\u5728eaccelerator \u6e90\u7801\u5305\u4e2d\u67e5\u627e eaccelerator.c \u6587\u4ef6\uff0c\u57281156\u884c<br \/>\nif (PG(open_basedir) &amp;&amp; php_check_open_basedir(realname TSRMLS_CC)) {<br \/>\n\u4fee\u6539\u6210\uff1a<br \/>\nif (PG(open_basedir) &amp;&amp; php_check_open_basedir(file_handle-&gt;filename TSRMLS_CC)) {<br \/>\n\u91cd\u65b0\u7f16\u8bd1\u5373\u53ef\u3002<br \/>\n\u6216\u76f4\u63a5\u5728 <a href=\"https:\/\/github.com\/eaccelerator\/eaccelerator\">https:\/\/github.com\/eaccelerator\/eaccelerator<\/a>\u00a0 Github\u4e0b\u8f7d\u6700\u65b0\u7684\u6e90\u7801\u5305,\u65b0\u7248\u5df2\u7ecf\u89e3\u51b3\u4e86\u6b64Bug.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u5e2e\u4e00\u670b\u53cb\u8c03\u8bd5\u7ad9\u70b9\uff0c\u4f7f\u7528CentOS\uff0c\u91cd\u65b0\u914d\u7f6e\u4e86\u7cfb\u7edf\u73af\u5883\uff0c\u8dd1ECShop\u7a0b\u5e8f\uff0c &hellip;<\/p>\n<p class=\"read-more\"><a href=\"https:\/\/www.sulabs.net\/?p=367\">\u7ee7\u7eed\u9605\u8bfb &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[80,81],"class_list":["post-367","post","type-post","status-publish","format-standard","hentry","category-php","tag-eaccelerator","tag-open_basedir"],"_links":{"self":[{"href":"https:\/\/www.sulabs.net\/index.php?rest_route=\/wp\/v2\/posts\/367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sulabs.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sulabs.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sulabs.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sulabs.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=367"}],"version-history":[{"count":2,"href":"https:\/\/www.sulabs.net\/index.php?rest_route=\/wp\/v2\/posts\/367\/revisions"}],"predecessor-version":[{"id":369,"href":"https:\/\/www.sulabs.net\/index.php?rest_route=\/wp\/v2\/posts\/367\/revisions\/369"}],"wp:attachment":[{"href":"https:\/\/www.sulabs.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sulabs.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sulabs.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}