{"id":745,"date":"2007-06-21T01:00:00","date_gmt":"2007-06-20T16:00:00","guid":{"rendered":"https:\/\/ecoop.net\/memo\/2007-06-21-1.html"},"modified":"2007-06-21T01:00:00","modified_gmt":"2007-06-20T16:00:00","slug":"2007-06-21-1","status":"publish","type":"post","link":"https:\/\/www.ecoop.net\/memo\/archives\/2007-06-21-1.html","title":{"rendered":"symfony \u3067 XCache \u306e\u7ba1\u7406\u30da\u30fc\u30b8\u8a8d\u8a3c\u304c\u51fa\u308b\u554f\u984c"},"content":{"rendered":"<p>\nXCache \u304c\u6709\u52b9\u306a\u74b0\u5883\u3067 symfony \u3092\u4f7f\u3046\u3068\u3001\u6642\u3005(\u521d\u56de\u5b9f\u884c\u6642\u3084\u30ad\u30e3\u30c3\u30b7\u30e5\u30af\u30ea\u30a2\u5f8c\u7b49\u306b) <br \/>\nXCache Administration \u3068\u3044\u3046\u30e1\u30c3\u30bb\u30fc\u30b8\u3067 HTTP \u8a8d\u8a3c\u304c\u51fa\u307e\u3059\u3002<br \/>\n\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u9055\u3063\u3066\u3044\u308b\u3068\u52ff\u8ad6\n<\/p>\n<blockquote><p>XCache Auth Failed. User and Password is case sense \n<\/p><\/blockquote>\n<p>\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n&nbsp;<br \/>\n\u3053\u306e\u307e\u307e\u3067\u306f\u90fd\u5408\u304c\u3068\u3066\u3082\u60aa\u3044\u306e\u3067\u539f\u56e0\u3068\u5bfe\u7b56\u3092\u8abf\u3079\u3066\u307f\u305f\u3068\u3053\u308d<br \/>\nsymfony framework forum \u306b\u3001\u3053\u306e\u554f\u984c\u306b\u3064\u3044\u3066\u30b3\u30e1\u30f3\u30c8\u304c\u3042\u308a\u307e\u3057\u305f\u3002<br \/>\n<a href=\"http:\/\/www.symfony-project.com\/forum\/index.php\/m\/26145\/\">http:\/\/www.symfony-project.com\/forum\/index.php\/m\/26145\/<\/a>\n<\/p>\n<blockquote><p>i tried XCache, APC and eAccelerator. What i discovered is, when the first hit occure (after symfony cc) there is a call for sfProcessCache::clear() in the checkConfig() method (line 201) of the sfConfigCache class. This happens even when using of ProcessCache is not enabled in the configuration.<br \/>\n&nbsp;<br \/>\nAll three of them require a user and password setting to use methods for clearing the cache. eAccelerator use ini settings, xCache require authentication. Thats bad, but not symfonys fault. The result is either a php &#8216;warning&#8217; (eAccelerator) or<strong>the authentication box popup (xCache) when you hit your app the first time<\/strong>.<br \/>\n&nbsp;<br \/>\nI helped myself by rewriting the sfProcessCache::clear() and adding few lines. For eAccelerator i&#8217;m setting the proper ini settings right before the call of eA&#8217;s clearing method, and for xCache by setting $_SERVER[&#8216;PHP_AUTH_USER&#8217;] and $_SERVER[&#8216;PHP_AUTH_PW&#8217;] before calling xcache_clear_cache(). I read those settings out of the app config YAML, where i added them manually.\n<\/p><\/blockquote>\n<p>\u3068\u306e\u3053\u3068\u3067\u3001<br \/>\nsfProcessCache::clear() \u3067 xcache_clear_cache() \u3092\u547c\u3076\u969b\u306b xcache \u306e\u7ba1\u7406\u6a29\u9650\u304c\u5fc5\u8981\u306a\u3053\u3068\u304c\u539f\u56e0\u306e\u3088\u3046\u3067\u3059\u3002<br \/>\n\u3053\u3053\u306b\u66f8\u304b\u308c\u3066\u3044\u308b\u3088\u3046\u306b\u81ea\u5206\u3067\n<\/p>\n<blockquote><p>$_SERVER[&#8216;PHP_AUTH_USER&#8217;] = &#8216;XCache\u306e\u7ba1\u7406\u30e6\u30fc\u30b6\u540d&#8217;;<br \/>\n$_SERVER[&#8216;PHP_AUTH_PW&#8217;] = &#8216; XCache \u306e\u7ba1\u7406\u30d1\u30b9\u30ef\u30fc\u30c9&#8217;;\n<\/p><\/blockquote>\n<p>\u3092\n<\/p>\n<blockquote><p>&lt;pear\u30c7\u30a3\u30ec\u30af\u30c8\u30ea>\/symfony\/cache\/sfProcessCache.class.php \u306e sfProcessCache::clear() \n<\/p><\/blockquote>\n<p>\u3084\u3001\u3042\u308b\u3044\u306f \n<\/p>\n<blockquote><p>&lt;symfony\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30eb\u30fc\u30c8>\/web\/index.php \n<\/p><\/blockquote>\n<p>\u306a\u3069\u306b\u66f8\u304d\u52a0\u3048\u308b\u4e8b\u3067\u5bfe\u51e6\u3067\u304d\u307e\u3059\u3002<br \/>\n&nbsp;<br \/>\n\u3082\u3046\u4e00\u3064\u306e\u89e3\u6c7a\u65b9\u6cd5\u3068\u3057\u3066\u3001XCache 1.2.1 RC1 \u304b\u3089\u306e\u65b0\u3057\u3044 php.ini \u306e\u8a2d\u5b9a\u3067\n<\/p>\n<blockquote><p>xcache.admin.enable_auth = Off\n<\/p><\/blockquote>\n<p>\u3068\u3059\u308c\u3070 XCache \u306e\u7ba1\u7406\u8a8d\u8a3c\u306a\u3057\u3067 xcache \u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u30af\u30ea\u30a2\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u8a8d\u8a3c\u3067\u304d\u306a\u304f\u3057\u3066\u7ba1\u7406\u6a5f\u80fd\u3092\u4f7f\u3048\u306a\u304f\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u8a8d\u8a3c\u306a\u3057\u3067 xcache \u306e\u7ba1\u7406\u64cd\u4f5c\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u4e8b\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u306a\u304a\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3092\u8003\u616e\u3057\u3066\u306a\u306e\u304b .htaccess \u3067\n<\/p>\n<blockquote><p>php_flag xcache.admin.enable_auth off \n<\/p><\/blockquote>\n<p>\u3068\u3057\u3066\u3082\u7121\u8996\u3055\u308c\u307e\u3059\u3002<br \/>\n&nbsp;<br \/>\n&#8211; \u524d\u8005\u306f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u9762\u3067\u5c11\u3057\u30de\u30b7\u3060\u304c\u3001\u7ba1\u7406\u9762\u3067\u624b\u9593<br \/>\n&#8211; \u5f8c\u8005\u306f XCache \u306b\u95a2\u3057\u3066\u5185\u90e8\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3092\u72a0\u7272\u306b\u3059\u308b\u304c\u3001\u697d<br \/>\n&nbsp;<br \/>\n\u306a\u306e\u3067\u3001\u72b6\u6cc1\u306b\u3088\u3063\u3066\u4f7f\u3044\u5206\u3051\u308b\u306e\u304c\u3088\u3055\u305d\u3046\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>XCache \u304c\u6709\u52b9\u306a\u74b0\u5883\u3067 symfony \u3092\u4f7f\u3046\u3068\u3001\u6642\u3005(\u521d\u56de\u5b9f\u884c\u6642\u3084\u30ad\u30e3\u30c3\u30b7\u30e5\u30af\u30ea\u30a2\u5f8c\u7b49\u306b) XCache Administration \u3068\u3044\u3046\u30e1\u30c3\u30bb\u30fc\u30b8\u3067 HTTP \u8a8d\u8a3c\u304c\u51fa\u307e\u3059\u3002 \u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u9055\u3063\u3066\u3044\u308b\u3068\u52ff\u8ad6  &hellip; <a href=\"https:\/\/www.ecoop.net\/memo\/archives\/2007-06-21-1.html\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">symfony \u3067 XCache \u306e\u7ba1\u7406\u30da\u30fc\u30b8\u8a8d\u8a3c\u304c\u51fa\u308b\u554f\u984c<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[32],"class_list":["post-745","post","type-post","status-publish","format-standard","hentry","tag-php"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts\/745","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/comments?post=745"}],"version-history":[{"count":0,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts\/745\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/media?parent=745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/categories?post=745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/tags?post=745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}