{"id":1044,"date":"2014-11-14T23:04:26","date_gmt":"2014-11-14T15:04:26","guid":{"rendered":"http:\/\/www.shsh.ylc.edu.tw\/~taichis\/wp\/?p=1044"},"modified":"2014-11-14T23:04:26","modified_gmt":"2014-11-14T15:04:26","slug":"drupal-views-%e7%a9%ba%e7%99%bd%e7%95%ab%e9%9d%a2%e8%a7%a3%e6%b1%ba","status":"publish","type":"post","link":"https:\/\/www.shsh.ylc.edu.tw\/~taichis\/wp\/?p=1044","title":{"rendered":"Drupal + views \u7a7a\u767d\u756b\u9762\u89e3\u6c7a"},"content":{"rendered":"<p>\u6211\u7684\u74b0\u5883\uff1a Ubuntu + Nginx + php5-fpm + Drupal <\/p>\n<p>\u5728 Drupal \u4e2d\u8a2d\u5b9a\u4e86 views \u6a21\u7d44\u4e4b\u5f8c\uff0c\u51fa\u73fe\u7a7a\u767d\u756b\u9762\uff0c\u7814\u5224\u662f php \u7684\u81f4\u547d\u932f\u8aa4 (Fatal error\uff09<br \/>\n\u6aa2\u67e5 \/var\/log\/nginx\/error.log \u679c\u7136\u767c\u73fe\u4ee5\u4e0b\u7684\u7247\u6bb5\u8a0a\u606f\uff1a<br \/>\n<code><br \/>\nFastCGI sent in stderr: \"PHP message: PHP Fatal error:  Cannot redeclare class view in \/var\/www\/drupal\/sites\/all\/modules\/views\/includes\/view.inc<br \/>\n<\/code> <\/p>\n<p>\u89e3\u6cd5\uff0c\u7de8\u8f2f \/etc\/php5\/fpm\/php.ini\uff0c\u52a0\u5165\u4ee5\u4e0b\u5169\u884c\uff1a<\/p>\n<p><code><br \/>\nopcache.enable=0<br \/>\nopcache.blacklist_filename=\"\/var\/www\/drupal\/sites\/all\/modules\/views\/includes\/view.inc\"<br \/>\n<\/code><\/p>\n<p>\u6ce8\u610f\u5176\u4e2d\u7684 blacklist_filename \u6307\u5411\u5be6\u969b\u7cfb\u7d71\u4e2d view.inc \u7684\u7d55\u5c0d\u8def\u5f91\uff0c\u6bcf\u500b\u4eba\u4e0d\u592a\u4e00\u6a23\u3002<\/p>\n<p>\u53c3\u8003[<a href=\"https:\/\/www.drupal.org\/node\/2066561#comment-8562145\">1<\/a>][<a href=\"http:\/\/php.net\/manual\/en\/opcache.configuration.php#ini.opcache.blacklist-filename\">2<\/a>]<\/p>\n<div class=\"fcbkbttn_buttons_block\" id=\"fcbkbttn_left\"><div class=\"fcbkbttn_like \"><fb:like href=\"https:\/\/www.shsh.ylc.edu.tw\/~taichis\/wp\/?p=1044\" action=\"like\" colorscheme=\"light\" layout=\"standard\" show-faces='false' width=\"450px\" size=\"small\"><\/fb:like><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>\u6211\u7684\u74b0\u5883\uff1a Ubuntu + Nginx + php5-fpm + Drupal &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.shsh.ylc.edu.tw\/~taichis\/wp\/?p=1044\"> <span class=\"screen-reader-text\">Drupal + views \u7a7a\u767d\u756b\u9762\u89e3\u6c7a<\/span> \u95b1\u8b80\u66f4\u591a &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,11],"tags":[],"_links":{"self":[{"href":"https:\/\/www.shsh.ylc.edu.tw\/~taichis\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1044"}],"collection":[{"href":"https:\/\/www.shsh.ylc.edu.tw\/~taichis\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shsh.ylc.edu.tw\/~taichis\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shsh.ylc.edu.tw\/~taichis\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shsh.ylc.edu.tw\/~taichis\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1044"}],"version-history":[{"count":1,"href":"https:\/\/www.shsh.ylc.edu.tw\/~taichis\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1044\/revisions"}],"predecessor-version":[{"id":1045,"href":"https:\/\/www.shsh.ylc.edu.tw\/~taichis\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1044\/revisions\/1045"}],"wp:attachment":[{"href":"https:\/\/www.shsh.ylc.edu.tw\/~taichis\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shsh.ylc.edu.tw\/~taichis\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1044"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shsh.ylc.edu.tw\/~taichis\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}