php环境配置优化
Php相关配置 – 基础
max_execution_time = 30 max_input_time = 60 memory_limit = 128 Mmax_input_vars = 1000 register_globals = Off post_max_size = 8M magic_quotes_gpc = Off error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED display_errors = Off display_startup_errors = Off log_errors = On default_socket_timeout = 600 date.timezone = Asia/Shanghai session.save_path = "tcp://mcs1.123.com:11211"
Php相关配置 – memcache
extension_dir = "/apps/lib/php5/lib/php/extensions/no-debug-non-zts-20090626“ [Memcache]extension ="memcache.so" memcache.allow_failover=1 //是否故障转移 memcache.hash_strategy=consistent 、standard //缓存策略 memcache.hash_function=crc32 //key映射算法 http://www.gosoa.com.cn/%E5%85%B3%E4%BA%8Ememcache%E5%88%86%E5%B8%83%E5%BC%8F%E4%B8%80%E8%87%B4%E6%80%A7hash
Php相关配置 – php代码缓存
zend_extension="/apps/lib/php5/lib/php/extensions/no-debug-non-zts-20090626/ZendGuardLoader.so“ zend_loader.enable=1 zend_loader.disable_licensing=0 zend_loader.obfuscation_level_support=3 [eaccelerator] extension=eaccelerator.soeaccelerator.shm_size="64"eaccelerator.cache_dir="/apps/logs/php/eaccelerator_cache"eaccelerator.enable="1“ eaccelerator.optimizer="1“ eaccelerator.check_mtime="1“ eaccelerator.debug="0“ eaccelerator.filter=""eaccelerator.shm_max="0“ eaccelerator.shm_ttl="3600“ eaccelerator.shm_prune_period="3600“ eaccelerator.shm_only="0“ eaccelerator.compress="1“ eaccelerator.compress_level="9"
[apc] extension=apc.so apc.enabled=1 apc.shm_segments = 1 apc.shm_size = 128 Mapc.ttl = 0 apc.user_ttl =7200 apc.num_files_hint = 1000 apc.write_lock=1 apc.stat = 0 apc.max_file_size=1 Mapc.filters = "“ apc.cache_by_default=0 apc.enable_cli=on apc.slam_defense=0
[xhprof] extension=xhprof.soxhprof.output_dir=/usr/xunanhao/xhprofdata
Php-fpm相关配置
user = apps group = apps error_log = /apps/logs/php/php-fpm.log listen = 127.0.0.1:9000 pm = static pm.max_children = 200 pm.start_servers = 10 pm.min_spare_servers = 10 pm.max_requests = 655350 php_flag[display_errors] = offphp_admin_value [error_log] = /apps/logs/php/php_admin_value.log php_admin_flag[log_errors] = on php_admin_value[memory_limit] = 128M
现主要从事PHP、Uinx/Linux、C/C++等方面的项目开发。