coreserverã§ã®APCï¼Alternative PHP Cacheï¼ã«ã¤ãã¦èª¿ã¹ã¦ã¿ã
ã¡ãã£ã¨Coreserverã§åããã¦ãphpã¢ããªã§ãAPCã使ãããªã使ã£ã¦ã¿ããã¨æã£ãã®ã§èª¿ã¹ã¦ã¿ã¾ããã
ã¾ã¨ã
ãã®åã«æ³¨æ
- Coreserverã¯ãµã¼ãã¼ã«ãã£ã¦æ§æãç°ãªãã®ã§ããã®ã¨ã³ããªã¼ãå½ã¦ã¯ã¾ããªãããç¥ãã¾ããã
- ãã®ã¨ã³ããªã¼ã®æ¹æ³ãCoreserverã«è¨±å¯ããã¦ãããã©ããåããã¾ããããã®ã¨ã³ããªã¼ã®è¶£æ¨ã¯APCã使ããã§ã¯ãªããããã¾ã§èª¿ã¹ãã¾ã¨ãã§ãã
ä¸å¿ããããã£ã½ã
ãã®éãphpinfo()
ã§APCã«ã¤ãã¦ç¢ºèªã§ãã¾ããããã ããã®APC使ã£ã¦è¯ãã®ãã©ããè¬ã§ãã
æé
è¤æ°ãã¡ã¤ã³ãéç¨ãã¦ã¦ãSubã«www.example.comãè¨å®ãã¦ããã¨ãã¾ãã
AddHandler application/x-httpd-php5cgi .php
ã¾ãã¯PHPãCGIã¢ã¼ãã§åãããã«ã/public_html/www.example.com/.htaccess
ãç½®ãã¾ããä¸å¿ãPHP4ã§åãããªãã¡ãã£ã¨å
容ãéã((x-httpd-php4cgi
ã ã£ãããªï¼))ã¾ãã
extension_dir = "/usr/local/lib/php/extensions/" extension=apc.so
次ã«ãã®å
容ã®php.iniã/public_html/www.example.com/php.ini
ã«è¨ç½®ãã¾ããAPCãåããã ããªãããã§ä¸å¿å®äºã§ãããã ãAPCã®è¨å®å¤ãã©ããããã¨ããã®ãããããåè¿°ã®éã使ã£ã¦è¯ããã®ãªã®ãã©ããåããã¾ããã
詳細
<初期費用無料> 超高速・高安定レンタルサーバー コアサーバー(CORESERVER)- 30日間無料お試しPHPãç½ç´ã«ãªããæ£å¸¸ã«å®è¡ãããªãå ´åã«ã¤ãã¦
å¯è½æ§ã¨ãã¦ãéç¨ããã¦ããPHPã¹ã¯ãªããã¨ããµã¼ãã¼å´ã§ã®PHPé«éåã»ãã£ãã·ã¥ã¢ã¸ã¥ã¼ã«ã¨ã®ç¸æ§ã®åé¡ãçºçãã¦ãããã¨ãããã¾ãããã®å ´åã¯ãä¸è¨ã³ãã³ããã.htaccessãã«è¨è¼ãã¦ãã ããã
php_flag apc.cache_by_default off
â»æ¨æºã§ãã£ãã·ã¥ãOnã«ãªã£ã¦ãããé«éåããã¦ããã¾ããæ示çã«æå¹ã«ããã«ã¯ãä¸è¨ã³ãã³ããã.htaccessãã«è¨è¼ãã¦ãã ããã
php_flag apc.cache_by_default on
ããããããã®ãã¼ã¸ãèªãéããCoreserverã§ã¯APCã¯å
ã
å°å
¥ããã¦ããã¯ãã§ããã«ãããããããèªåã確èªã§ãã2ã¤ã®ãµã¼ãã¼ã§ã¯ãAPCãåãã¦ãã¾ããã§ãããphp_flag apc.cache_by_default on
ãæ¸ããããphpãã¢ã¸ã¥ã¼ã«ã¢ã¼ãã»CGIã¢ã¼ãã«åãæ¿ããããã¦ã¿ã¦ããphpinfo()
ã§APCã®é
ç®ã¯åºã¦ãã¾ããã
http://sb.xrea.com/showthread.php?t=10744âãphp.iniããè¨ç½®ãã«ã¹ã¿ãã¤ãºãã¦åãã
ãèªèº«ã§ãphp.iniããè¨ç½®ãã¦åãããã¨ãã§ãã¾ãã
è¨ç½®å ´æã¯ãå¼ã³åºãphpãã¡ã¤ã«ãè¨ç½®ãã¦ãããã£ã¬ã¯ããªã»ãã©ã«ãå ã«ãªãã¾ããä¸ç¥
## SQLiteã¢ã¸ã¥ã¼ã«ã使ã
extension_dir = "/usr/local/lib/php/extensions/"
extension=sqlite.so
extension=sqlite3.so
ãããè¦ãã¨/usr/local/lib/php/extensions/
ã«phpæ¡å¼µã¢ã¸ã¥ã¼ã«ãç½®ãã¦ããããã§ãã
> ls /usr/local/lib/php/extensions/ apc.la eaccelerator.so no-debug-non-zts-20050922 php_ming.so sqlite.so xcache.so apc.so imagick.so no-debug-non-zts-20060613 sqlite3.so xcache.la
sshã§è¦ã¦ã¿ãã¨*1apc.soãç½®ãã¦ããã¾ããã
extension_dir = "/usr/local/lib/php/extensions/" extension=apc.so
åè¿°ã®å¼ç¨ã®éããCGIã¢ã¼ãã§phpãåãããªããphp.iniãè¨ç½®ã§ããã®ã§phpæ¡å¼µã¢ã¸ã¥ã¼ã«ã追å ã§ãã¾ããSQLiteã®ã±ã¼ã¹ãåèã«apc.soã追å ããã¨ãããçµæã®éãAPCãåãã¾ããã
No cache info available. APC does not appear to be running.
APCã¯PECLã§é å¸ããã¦ãã¾ããããããããã¦ã³ãã¼ãããå ´åã¯apc.phpã¨ãã管çç»é¢ã®æ§ãªã¹ã¯ãªãããä»ãã¦ãã¾ãããã®å ããè¨ç½®ãã¦ãã£ãapc.soã¯3.0.15ãªã®ã§ãPECL :: Package :: APCããAPC-3.0.15.tgzããã¦ã³ãã¼ããã¦ãããã®acp.phpãç½®ãã¦ã¿ããä¸è¨ã¨ã©ã¼ã
array(10) { [0]=> string(25) "apc_cache_info_digirockvv" [1]=> string(15) "apc_clear_cache" [2]=> string(12) "apc_sma_info" [3]=> string(9) "apc_store" [4]=> string(9) "apc_fetch" [5]=> string(10) "apc_delete" [6]=> string(20) "apc_define_constants" [7]=> string(18) "apc_load_constants" [8]=> string(16) "apc_compile_file" [9]=> string(7) "apc_add" } <?php var_dump(get_extension_funcs('apc')); ?> <hr /> <?php show_source(__FILE__); ?>
APCã®é¢æ°ãåºåãã¦ã¿ãã¨ããapc_cache_info()ãç¡ãã代ããã«apc_cache_info_digirockvv()
ãããã¾ãããååããå¯ããã«Coreserverå´ã§ä½ãæãå
¥ãã¦ããããã§ããapc.phpå
ã®apc_cache_info()
ãä¸éãapc_cache_info_digirockvv()
ã«ç½®ãæãã¦ãapc.phpãåãã¾ãããapc.phpã®è¡¨ç¤ºã§ã¯ãå®éã«APCãåãã¦ãã£ãã·ã¥ããã¦ããäºã確èªã§ãã¾ããã
ã¨ããããªæãã§ãå ã å°å ¥ããã¦ãã¯ããªã®ã«ç¡ãã£ãããã§ãapc.soã ãã¯ç½®ãã¦ãã£ããã§ããã®ã¾ã¾ä½¿ã£ã¦è¯ãã®ãã©ããã¯ã¡ãã£ã¨è¬ã§ããä¸å¿ããããç¶æ³ã§ãã¨ããã¾ã¨ãã¨ãã¦æ¸ãã¦ããã¾ãã
ç°å¢
coreserver
Apache | 1.3.37 |
php | 5.2.5 |
APC | 3.0.15 |
*1:rbashã¯åé¿æ¸ã¿