묻고답하기
Xcache와 eaccelerator 쓰시는분에게 질문좀
2009.06.07 22:45
kldp에 물어도 아무 답변도 없고 , php스쿨에 물어도 답변없고.... 외국의 php포럼을 검색해도 답이 안나오네요...혹 아시는분 있나요?
어떤 설정에서 잘못된것인지...
커널버젼은 Linux 2.6.25-14.fc9.i686 #1 SMP Thu May 1 06:28:41 EDT 2008 i686 i686 i386 GNU/Linux 이것이고요..
AMP을 설치하고 , /usr/local/Zend/etc/php.ini에 아무리 설정을 해줘도 두 엔진이 붙질않네요..
컴파일 옵션은
Xcache가
./configure --enable-xcache --enable-xcache-coverager
eaccelerator가
./configure --enable-accelerator
입니다.
물론 zend optimizer는 설치되어 있고요..
php.ini의 설정내용입니다.
/tmp/eaccelerator도 생성하고 권한도 777로 주었습니다만..
도무지 될생각을 안하네요..
php.ini입니다.
[Zend]
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
zend_optimizer.version=3.3.3
zend_extension_ts=/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/xcache.so
zend_extension_ts=/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
[xcache-common]
[xcache.admin]
xcache.admin.enable_auth=Off
xcache.admin.user="admin"
xcache.admin.pass=""
[xcache]
xcache.shm_scheme="mmap"
xcache.size=64M
xcache.count=1
xcache.slots=8K
xcache.ttl=0
xcache.gc_interval=0
xcache.var_size=64M
xcache.var_count=1
xcache.var_slots=8K
xcache.var_ttl=0
xcache.var_maxttl=0
xcache.var_gc_interval=300
xcache.test=Off
xcache.readonly_protection=Off
xcache.mmap_path="/dev/zero"
xcache.coredump_directory=""
xcache.cacher=On
xcache.stat=On
xcache.optimizer=On
xcache.coverager=On
xcache.coveragedump_directory=""
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
eaccelerator.log_file="/var/log/eaccelerator.log"
so가 설치된 디렉토리는 이상이 없습니다.
[root@localhost no-debug-non-zts-20060613]# ls
eaccelerator.so imap.so xcache.so
[root@localhost no-debug-non-zts-20060613]# pwd
/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613
아무리 세팅을 바꿔봐도 요지부동이네요...
[root@localhost no-debug-non-zts-20060613]# php -v
PHP 5.2.9 (cli) (built: Jun 3 2009 22:37:55)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies
[root@localhost no-debug-non-zts-20060613]#
결과는 Zend만 붙어있네요..
여기저기 구글링해봐도 답은 안나오고요...
혹 아시는분 없나요?
php 버젼은 PHP 5.2.9이고요 아파치는 Apache/2.2.10입니다.
php컴파일 환경은 이렇고요..
./configure' '--prefix=/usr/local/php' '--with-apxs2=/usr/local/httpd/bin/apxs' '--with-mysql=/usr/local/mysql' '--with-config-file-path=/usr/local/httpd/conf' '--with-exec-dir=/usr/local/httpd/bin' '--with-gd=shared' '--with-xmlrpc' '--with-openssl' '--with-gd' '--enable-gd-native-ttf' '--with-curl=/usr/local/curl' '--with-zlib' '--with-jpeg-dir=/usr/lib' '--with-png-dir=/usr/lib' '--with-kerberos' '--with-imap-ssl' '--with-libxml-dir' '--with-imap=shared' '--enable-inline-optimization' '--enable-mbstring'
여기저기 다 찾아봐도 답이 안나와서 좀 아시는분 있으시면 답변좀...
댓글 3
-
피키4
2009.06.07 23:47
-
아카스
2009.06.08 01:24
답변 감사합니다. 엑셀레이터나 x캐쉬 단일로 설치하면 설치가 됩니다.. 문제의 원인은 Zend Optimizer와 뭔가 문제가 있는듯 한데.... 성의있는 답변 감사드립니다... -
ienfant
2009.06.15 09:25
두가지 이상의 opcode cacher는 공존 할 수 없으니 eaccelerator, xcache 중 하나를 택일 하시고요. opcode cacher가 로딩 된 후 zend optimizer를 로딩하게 하면 됩니다. xcache의 coverager, optmizer 다 끄시고요. xcache 포럼을 안 살펴보신거 같네요. 거기에 정보 무지하게 많습니다.
도움이 될지 모르겠지만 제 경우를 말씀드릴께요.. 일단 Xcache는 사용하지 않구요 eaccelerator 만 사용합니다.
----------------------------------------------------------------------------------------------------------------------------------------------
[root@localhost ~]# php -v
PHP 5.1.6 (cli) (built: Apr 7 2009 08:00:04)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
with eAccelerator v0.9.5.3, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
[root@localhost ~]# locate eaccelerator.so
/usr/lib/php/modules/eaccelerator.so
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
그리고 /etc/php.d/eaccelerator.ini 내용입니다
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
[eaccelerator]
;;;;;;;;;;;;;;;;;;;
; About this file ;
;;;;;;;;;;;;;;;;;;;
;
; eAccelerator is compatible with Zend Optimizer's loader. Zend Optimizer
; must be installed after eAccelerator in php.ini. If you don't use scripts
; encoded with Zend Encoder then we do not recommend you install Zend Optimizer
; with eAccelerator.
; You must uncomment one (and only one) line from the following to load
; eAccelerator extension.
;extension="eaccelerator.so"
zend_extension="/usr/lib/php/modules/eaccelerator.so"
;zend_extension_ts="/usr/lib/php4/eaccelerator.so"
;extension="eaccelerator.dll"
;zend_extension_ts="c:\php4\eaccelerator.dll"
;zend_extension="c:\php4\eaccelerator.dll"
; The amount of shared memory (in megabytes) that eAccelerator will use.
; "0" means OS default. Default value is "0".
eaccelerator.shm_size = "0"
; The directory that is used for disk cache. eAccelerator stores precompiled
; code, session data, content and user entries here. The same data can be
; stored in shared memory also (for more quick access). Default value is
; "/tmp/eaccelerator".
eaccelerator.cache_dir = "/tmp/eaccelerator"
; Enables or disables eAccelerator. Should be "1" for enabling or
; "0" for disabling. Default value is "1".
eaccelerator.enable = "1"
; Enables or disables internal peephole optimizer which may speed up code
; execution. Should be "1" for enabling or "0" for disabling.
; Default value is "1".
eaccelerator.optimizer = "1"
; Enables or disables debug logging. Setting this to 1 will print information
; to the log file about the cach hits of a file.
eaccelerator.debug = 0
; Set the log file for eaccelerator. When this option isn't set then the data
; will be logged to stderr
eaccelerator.log_file = "/var/log/httpd/eaccelerator_log"
; A string that's prepended to all keys. This allows two applications that use the
; same key names to run on the same host by setting this in .htaccess or in the main
; configuration file for the whole webserver.
eaccelerator.name_space = ""
; Enables or disables PHP file modification checking. Should be "1"
; for enabling or "0" for disabling. You should set it to "1" if you want
; to recompile PHP files after modification. Default value is "1".
eaccelerator.check_mtime = "1"
; Determine which PHP files must be cached. You may specify the number of
; patterns (for example "*.php *.phtml") which specifies to cache or
; not to cache. If pattern starts with the character "!", it means to ignore
; files which are matched by the following pattern. Default value is "" that
; means - all PHP scripts will be cached.
eaccelerator.filter = ""
; Disables putting large values into shared memory by "eaccelerator_put()"
; function.
; It indicates the largest allowed size in bytes (10240, 10K, 1M). The "0"
; disables the limit. Default value is "0".
eaccelerator.shm_max = "0"
; When eAccelerator fails to get shared memory for new script it removes
; all scripts which were not accessed at last "shm_ttl" seconds from shared
; memory. Default value is "0" that means - don't remove any files from
; shared memory.
eaccelerator.shm_ttl = "0"
; When eAccelerator fails to get shared memory for new script it tryes to
; remove old script if the previous try was made more then "shm_prune_period"
; seconds ago. Default value is "0" that means - don't try to remove any
; files from shared memory.
eaccelerator.shm_prune_period = "0"
; Enables or disables caching of compiled scripts on disk. It has no effect
; on session data and content caching.
; Default value is "0" that means - use disk and shared memory for caching.
eaccelerator.shm_only = "0"
; Enables or disables cached content compression. Default value is "1" that
; means enable compression.
eaccelerator.compress = "1"
; Compression level used for content caching. Default value is "9" which i
; is the maximum compression level
eaccelerator.compress_level = "9"
; Determine where keys, session data and content will be cached. The possible
; values are:
; "shm_and_disk" - cache data in shared memory and on disk (default value)
; "shm" - cache data in shared memory or on disk if shared memory
; is full or data size greater then "eaccelerator.shm_max"
; "shm_only" - cache data in shared memory
; "disk_only" - cache data on disk
; "none" - don't cache data
eaccelerator.keys = "shm_and_disk"
eaccelerator.sessions = "shm_and_disk"
eaccelerator.content = "shm_and_disk"
; The script paths that are allowed to get admin information and do admin
; controls
eaccelerator.allowed_admin_path = ""
---------------------------------------------------------------------------------------------------------------
이상입니다 도움이 되었으면 좋겠네요..