Home | Mirror | SearchITEYE 博客 | OSChina 博客 | 51CTO 博客

第 7 章 PECL :: The PHP Extension Community Library

目錄

7.1. php-apc - APC (Alternative PHP Cache) module for PHP 5
7.1.1. 編譯安裝 APC Cache
7.2. PHP Memcache
7.2.1. pecl
7.2.2. apt-get
7.2.3. example
7.3. php5-gd - GD module for php5
7.4. Database Extensions
7.4.1. sqlite
7.4.2. mysqli
7.4.3. MongoDB
7.4.4. php-redis.x86_64 : Extension for communicating with the Redis key-value store
7.4.4.1. pecl 安裝
7.4.4.2. yum安裝
7.4.4.3. 源碼編譯安裝
7.4.4.4. 配置 redis.ini
7.4.4.5. Session 配置
7.4.5. php5-pgsql - PostgreSQL module for php5
7.4.6. PHP connect SQL Server under unix like
7.4.7. MySQL
7.4.8. oracle
7.5. xmlrpc
7.6. openssl
7.7. mcrypt
7.8. mhash
7.9. simplexml
7.10. ionCube
7.11. ZendOptimizer
7.12. zip
7.13. pcntl
7.14. mbstring
7.15. Suhosin
7.16. freetype
7.17. XCache
7.17.1. apt-get
7.17.2. make
7.18. XHProf
7.18.1. XHGui
7.19. Xdebug
7.19.1. Webgrind
7.19.2. WinCacheGrind
7.20. UploadProgress
7.21. msgpack
7.22. iconv
7.23. imagick
7.24. sysvmsg

7.1. php-apc - APC (Alternative PHP Cache) module for PHP 5

		
$ apt-cache search php-apc
php-apc - APC (Alternative PHP Cache) module for PHP 5

$ sudo apt-get install php-apc

echo "apc.enabled = 1
apc.shm_size = 128
apc.shm_segments=1
apc.write_lock = 1
apc.rfc1867 = On
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.enable_cli=1
apc.slam_defense = Off
" >> /etc/php5/conf.d/apc.ini
		
		
# php -r 'phpinfo();' | grep apc
PHP Warning:  phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Command line code on line 1
Additional .ini files parsed => /srv/php-5.4.15/etc/conf.d/apc.ini
apc
apc.cache_by_default => On => On
apc.canonicalize => On => On
apc.coredump_unmap => Off => Off
apc.enable_cli => Off => Off
apc.enabled => On => On
apc.file_md5 => Off => Off
apc.file_update_protection => 2 => 2
apc.filters => no value => no value
apc.gc_ttl => 3600 => 3600
apc.include_once_override => Off => Off
apc.lazy_classes => Off => Off
apc.lazy_functions => Off => Off
apc.max_file_size => 1M => 1M
apc.mmap_file_mask => no value => no value
apc.num_files_hint => 1000 => 1000
apc.preload_path => no value => no value
apc.report_autofilter => Off => Off
apc.rfc1867 => Off => Off
apc.rfc1867_freq => 0 => 0
apc.rfc1867_name => APC_UPLOAD_PROGRESS => APC_UPLOAD_PROGRESS
apc.rfc1867_prefix => upload_ => upload_
apc.rfc1867_ttl => 3600 => 3600
apc.serializer => default => default
apc.shm_segments => 1 => 1
apc.shm_size => 32M => 32M
apc.shm_strings_buffer => 4M => 4M
apc.slam_defense => On => On
apc.stat => On => On
apc.stat_ctime => Off => Off
apc.ttl => 0 => 0
apc.use_request_time => On => On
apc.user_entries_hint => 4096 => 4096
apc.user_ttl => 0 => 0
apc.write_lock => On => On
		

7.1.1. 編譯安裝 APC Cache

例 7.1. php apc cache

pecl install

/usr/local/php/bin/pecl install apc
				

php.ini

				
extension_dir = "/usr/local/php-5.3.3/lib/php/extensions/"
extension = apc.so
				
				

comments powered by Disqus