├── mongo ├── db │ └── .gitignore └── logs │ └── .gitignore ├── mysql ├── db │ └── .gitignore ├── logs │ └── .gitignore ├── mysql.conf.d │ └── mysqld.cnf └── conf.d │ └── my.cnf ├── nginx ├── ca │ └── .gitignore ├── conf.d │ ├── .gitignore │ ├── nginx.default │ └── demo.cfg ├── my_modules │ ├── ngx_http_upload_module.so │ └── 安装动态库.txt ├── Dockerfile └── docker-make-ssl.sh ├── redis ├── db │ └── .gitignore └── conf.d │ └── redis.conf ├── www └── index.php ├── elasticsearch └── es1 │ ├── data │ └── .gitignore │ └── config │ ├── elasticsearch.yml │ └── jvm.options ├── .gitignore ├── php ├── ext │ ├── so │ │ └── molten.so │ └── ini │ │ ├── molten.ini │ │ └── seaslog.ini ├── Dockerfile └── php.ini ├── beanstalk ├── aurora │ └── conf │ │ └── aurora.toml └── Dockerfile ├── example.env ├── README.md └── docker-compose.yaml /mongo/db/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /mongo/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /mysql/db/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /mysql/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /mysql/mysql.conf.d/mysqld.cnf: -------------------------------------------------------------------------------- 1 | # 清空这里 -------------------------------------------------------------------------------- /nginx/ca/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /redis/db/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /www/index.php: -------------------------------------------------------------------------------- 1 | " 4 | 5 | RUN apk add --no-cache tini beanstalkd xdg-utils curl wget 6 | 7 | 8 | RUN mkdir -p /usr/local/aurora/ && \ 9 | cd /usr/local/aurora/ && \ 10 | wget --no-check-certificate http://www.ninja911.com/downloads/aurora_linux_amd64_v2.2.tar.gz && \ 11 | tar -zxf /usr/local/aurora/aurora_linux_amd64_v2.2.tar.gz && \ 12 | chmod +x /usr/local/aurora/aurora && \ 13 | rm -f /usr/local/aurora/aurora_linux_amd64_v2.2.tar.gz 14 | 15 | # 启动aurora命令 16 | # /usr/local/aurora/aurora -c /usr/local/aurora/conf/aurora.toml 17 | 18 | WORKDIR /usr/local/aurora 19 | 20 | EXPOSE ${BEANSTALKD_PORT} 3000 21 | 22 | ENTRYPOINT ["/sbin/tini", "--"] 23 | 24 | CMD /usr/bin/beanstalkd -l $BEANSTALKD_ADDR -p $BEANSTALKD_PORT -z $BEANSTALKD_MAX_JOB_SIZE -------------------------------------------------------------------------------- /mysql/conf.d/my.cnf: -------------------------------------------------------------------------------- 1 | [client] 2 | default-character-set=utf8mb4 3 | 4 | [mysql] 5 | default-character-set=utf8mb4 6 | 7 | 8 | [mysqld] 9 | pid-file = /var/run/mysqld/mysqld.pid 10 | #为了和php通信 11 | socket = /var/run/mysqld/mysql.sock 12 | datadir = /var/lib/mysql 13 | log-error = /var/log/mysql/error.log 14 | slow_query_log = ON 15 | slow_query_log_file = /var/log/mysql/slow.log 16 | slow_launch_time = 2 17 | 18 | # By default we only accept connections from localhost 19 | # bind-address = 0.0.0.0 20 | # Disabling symbolic-links is recommended to prevent assorted security risks 21 | symbolic-links=0 22 | 23 | 24 | init_connect='SET collation_connection = utf8mb4_unicode_ci' 25 | init_connect='SET NAMES utf8mb4' 26 | character-set-server=utf8mb4 27 | collation-server=utf8mb4_unicode_ci 28 | skip-character-set-client-handshake -------------------------------------------------------------------------------- /nginx/conf.d/nginx.default: -------------------------------------------------------------------------------- 1 | 2 | user nginx; 3 | worker_processes 1; 4 | 5 | # 加载动态库进去 6 | load_module modules/ngx_http_upload_module.so; 7 | 8 | error_log /var/log/nginx/error.log warn; 9 | pid /var/run/nginx.pid; 10 | 11 | 12 | events { 13 | worker_connections 1024; 14 | } 15 | 16 | http { 17 | include /etc/nginx/mime.types; 18 | default_type application/octet-stream; 19 | 20 | log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 21 | '$status $body_bytes_sent "$http_referer" ' 22 | '"$http_user_agent" "$http_x_forwarded_for"'; 23 | 24 | access_log /var/log/nginx/access.log main; 25 | 26 | sendfile on; 27 | #tcp_nopush on; 28 | 29 | keepalive_timeout 65; 30 | 31 | #gzip on; 32 | 33 | include /etc/nginx/conf.d/*.conf; 34 | } 35 | -------------------------------------------------------------------------------- /nginx/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:1.15.3 2 | 3 | LABEL maintainer="ninja911" 4 | 5 | ENV TIMEZONE Asia/Shanghai 6 | 7 | # replace sources.list 8 | RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list \ 9 | && sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list \ 10 | && cp /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \ 11 | && echo "${TIMEZONE}" > /etc/timezone 12 | 13 | # init 14 | RUN apt-get update && \ 15 | apt-get install -y --no-install-recommends \ 16 | openssl \ 17 | vim \ 18 | locales \ 19 | expect \ 20 | && rm -rf /var/lib/apt/lists/* 21 | 22 | # 替换VIM鼠标状态为非可视状态 23 | RUN sed -i 's/mouse\=a/mouse=v/g' /usr/share/vim/vim80/defaults.vim 24 | 25 | RUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && locale-gen 26 | 27 | ENV LANG=en_US.UTF-8 \ 28 | LC_ALL=en_US.UTF-8 29 | 30 | COPY docker-make-ssl.sh /usr/local/bin/ 31 | 32 | #RUN ln -s /usr/local/bin/docker-make-ssl.sh /docker-make-ssl.sh 33 | #ENTRYPOINT ["docker-make-ssl.sh"] 34 | 35 | 36 | EXPOSE 80 37 | EXPOSE 443 38 | 39 | STOPSIGNAL SIGTERM 40 | 41 | CMD ["nginx", "-g", "daemon off;"] -------------------------------------------------------------------------------- /php/ext/ini/molten.ini: -------------------------------------------------------------------------------- 1 | [Molten] 2 | ;extension = molten.so 3 | 4 | ;1开启,0关闭, 默认 1 5 | molten.enable = 0 6 | 7 | ;设置应用服务名, 默认default 8 | molten.service_name = "default" 9 | 10 | ; 追踪cli模式下信息, 1开启,0关闭, 默认0 11 | molten.tracing_cli = 0 12 | 13 | ;类型类型, 1采样率控制, 2通过每分钟request数, 默认是1 14 | molten.sampling_type = 1 15 | 16 | ;采样类型是请求数采样,每分钟的采样请求数, 默认是10 17 | molten.sampling_request = 10 18 | 19 | ;采样类型是采样率时,每个请求的采样几率, 默认是256 20 | molten.sampling_rate_base = 256 21 | 22 | ;通知管理中心的uri 23 | molten.notify_uri = "" 24 | 25 | ;数据模块调用间隔, 默认 60 26 | molten.report_interval = 60 27 | 28 | ;数据上报请求上限, 默认 100 29 | molten.report_limit = 100 30 | 31 | ;数据落地类型, 1 写入文件, 文件地址依赖molten.sink_log_path, 2 写入到标准输出, 3 写入到syslog中, 4 通过curl发送, 发送地址依赖 molten.sink_http_uri. 32 | molten.sink_type = 1 33 | 34 | ;输出全部追踪块(span)(1) 或者一行输出一个块(2)。 35 | molten.output_type = 1 36 | 37 | ;写入文件地址 38 | molten.sink_log_path = "/var/log/www/molten.log" 39 | 40 | ;发送http地址 41 | molten.sink_http_uri = "" 42 | 43 | ;发送日志到syslog udp unixdomain日志收集源中。 44 | molten.sink_syslog_unix_socket = "" 45 | 46 | ;追踪块格式(span), 不同的追踪系统选择zipkin 或者 zipkin_v2或者 opentracing。 47 | molten.span_format = "zipkin_v2" -------------------------------------------------------------------------------- /nginx/my_modules/安装动态库.txt: -------------------------------------------------------------------------------- 1 | # 在nginx 容器里,安装upload动态模块时用到的命令 2 | # 使用动态扩展库方法,复制nginx/my_modules/xxxx.so 文件到nginx容器里/etc/nginx/module/内,并修改nginx.conf文件,在worker_processes下一行追加 `load_module modules/xxxx.so;`,可以参考conf.d/nginx.default配置. 3 | apt-get install g++ make m4 unzip wget libssl-dev -y 4 | 5 | ./nginx-build -d work -v=1.15.3 -pcre -zlib --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --add-dynamic-module=/home/install-dir/up-source/nginx-upload-module 6 | 7 | 8 | # 已有模块 9 | [大文件上传][v2.3.0]ngx_http_upload_module.so 源码地址:https://github.com/fdintino/nginx-upload-module -------------------------------------------------------------------------------- /nginx/conf.d/demo.cfg: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | client_max_body_size 20M; 4 | 5 | # 如果要开启443,请先生成你的服务器证书,若双向认证,请导入证书到你的电脑里 6 | # listen 443 ssl; 7 | # ssl_certificate /etc/nginx/ca/ssl/certs/server.cer; 8 | # ssl_certificate_key /etc/nginx/ca/ssl/private/server.key; 9 | # ssl_client_certificate /etc/nginx/ca/ssl/certs/ca.cer; 10 | # ssl_verify_client off; 11 | # ssl_prefer_server_ciphers on; 12 | # ssl_protocols TLSv1 TLSv1.1 TLSv1.2; 13 | # ssl_ciphers HIGH:!aNULL:!MD5; 14 | 15 | #多个域名用空格分割,第一个为默认 16 | server_name www.dev.local.cn; 17 | 18 | charset UTF-8; 19 | index default.html default.htm default.php index.html index.htm index.php; 20 | 21 | # 定义根目录 22 | set $root /works/project/laravel/public; 23 | 24 | # 设置站点路径 25 | root $root; 26 | 27 | # 防止目录浏览 28 | autoindex off; 29 | 30 | #sendfile off; 31 | 32 | # 防止.htaccess文件被请求 33 | location ~ /\.ht { 34 | deny all; 35 | } 36 | location / { 37 | try_files $uri $uri/ /index.php?$query_string; 38 | } 39 | 40 | #error_page 404 /err/404.htm; 41 | 42 | # 将php类型的请求转交给fastcgi 43 | location ~ \.php$ { 44 | fastcgi_pass php:9000; 45 | try_files $uri =404; 46 | fastcgi_split_path_info ^(.+\.php)(.*)$; 47 | fastcgi_index index.php; 48 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 49 | fastcgi_param PHP_VALUE "open_basedir=/works/:/tmp/:/var/log/"; 50 | include fastcgi_params; 51 | #include fastcgi.conf; 52 | } 53 | 54 | #缓存图片周期30天 55 | #location ~* \.(jpg|jpeg|gif|png)$ { 56 | # access_log off; 57 | # expires 30d; 58 | #} 59 | #缓存js和css7天 60 | #location ~* \.(js|css)$ { 61 | # access_log off; 62 | # expires 7d; 63 | #} 64 | 65 | # 访问日志: 66 | #access_log /var/log/nginx/local.cn.access.log; 67 | } 68 | 69 | 70 | -------------------------------------------------------------------------------- /php/ext/ini/seaslog.ini: -------------------------------------------------------------------------------- 1 | [SeasLog] 2 | ;configuration for php SeasLog module 3 | ;extension = seaslog.so 4 | 5 | ;默认log根目录 6 | seaslog.default_basepath = "/var/log/www" 7 | 8 | ;默认logger目录 9 | seaslog.default_logger = "default" 10 | 11 | ;日期格式配置 默认"Y-m-d H:i:s" 12 | seaslog.default_datetime_format = "Y-m-d H:i:s" 13 | 14 | ;日志格式模板 默认"%T | %L | %P | %Q | %t | %M" 15 | seaslog.default_template = "%T | %L | %P | %Q | %t | %M" 16 | 17 | ;是否以目录区分Logger 1是(默认) 0否 18 | seaslog.disting_folder = 1 19 | 20 | ;是否以type分文件 1是 0否(默认) 21 | seaslog.disting_type = 0 22 | 23 | ;是否每小时划分一个文件 1是 0否(默认) 24 | seaslog.disting_by_hour = 0 25 | 26 | ;是否启用buffer 1是 0否(默认) 27 | seaslog.use_buffer = 0 28 | 29 | ;buffer中缓冲数量 默认0(不使用buffer_size) 30 | seaslog.buffer_size = 100 31 | 32 | ;cli运行时关闭buffer 33 | ;1是 0否(默认) 34 | seaslog.buffer_disabled_in_cli = 0 35 | 36 | ;记录日志级别,数字越大,根据级别记的日志越多。 37 | ;0-EMERGENCY 1-ALERT 2-CRITICAL 3-ERROR 4-WARNING 5-NOTICE 6-INFO 7-DEBUG 8-ALL 38 | ;默认8(所有日志) 39 | ; 40 | ; 注意, 该配置项自1.7.0版本开始有变动。 41 | ; 在1.7.0版本之前, 该值数字越小,根据级别记的日志越多: 42 | ; 0-all 1-debug 2-info 3-notice 4-warning 5-error 6-critical 7-alert 8-emergency 43 | ; 1.7.0 之前的版本,该值默认为0(所有日志); 44 | seaslog.level = 8 45 | 46 | ;日志函数调用回溯层级 47 | ;影响预定义变量 %F 中的行数 48 | ;默认0 49 | seaslog.recall_depth = 0 50 | 51 | ;自动记录notice 默认0(关闭) 52 | seaslog.trace_notice = 0 53 | 54 | ;自动记录warning 默认0(开启) 55 | seaslog.trace_warning = 0 56 | 57 | ;自动记录错误 默认1(开启) 58 | seaslog.trace_error = 1 59 | 60 | ;自动记录异常信息 默认0(关闭) 61 | seaslog.trace_exception = 0 62 | 63 | ;日志存储介质 1File 2TCP 3UDP (默认为1) 64 | seaslog.appender = 1 65 | 66 | ;写入重试次数 67 | ;默认0(不重试) 68 | seaslog.appender_retry = 0 69 | 70 | ;接收ip 默认127.0.0.1 (当使用TCP或UDP时必填) 71 | seaslog.remote_host = "127.0.0.1" 72 | 73 | ;接收端口 默认514 (当使用TCP或UDP时必填) 74 | seaslog.remote_port = 514 75 | 76 | ;接收端口的超时时间 默认1秒 77 | seaslog.remote_timeout = 1 78 | 79 | ;过滤日志中的回车和换行符 (默认为0) 80 | seaslog.trim_wrap = 0 81 | 82 | ;是否开启抛出SeasLog自身异常 1开启(默认) 0否 83 | seaslog.throw_exception = 1 84 | 85 | ;是否开启忽略SeasLog自身warning 1开启(默认) 0否 86 | seaslog.ignore_warning = 1 -------------------------------------------------------------------------------- /nginx/docker-make-ssl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # set -e 4 | 5 | # 生成CA证书 6 | # 替换opensll 证书生成目录 7 | sed -i 's/\.\/demoCA/\/etc\/nginx\/ssl/g' /etc/ssl/openssl.cnf 8 | 9 | cd /etc/nginx/ 10 | 11 | rm -rf /etc/nginx/ssl/ 12 | mkdir -p /etc/nginx/ssl/certs/ 13 | mkdir -p /etc/nginx/ssl/crl/ 14 | mkdir -p /etc/nginx/ssl/private/ 15 | 16 | /usr/bin/openssl genrsa -out /etc/nginx/ssl/private/ca.pem 2048 17 | /usr/bin/openssl rsa -in /etc/nginx/ssl/private/ca.pem -out /etc/nginx/ssl/private/ca.key 18 | /usr/bin/openssl req -new -key /etc/nginx/ssl/private/ca.pem -out /etc/nginx/ssl/private/ca.csr -subj "/C=CN/ST=myprovince/L=mycity/O=myorganization/OU=mygroup/CN=myCA" 19 | /usr/bin/openssl x509 -req -days 365 -sha1 -extensions v3_req -signkey /etc/nginx/ssl/private/ca.pem -in /etc/nginx/ssl/private/ca.csr -out /etc/nginx/ssl/certs/ca.cer 20 | 21 | 22 | # 生成服务端证书 23 | /usr/bin/openssl genrsa -out /etc/nginx/ssl/private/server.pem 2048 24 | /usr/bin/openssl rsa -in /etc/nginx/ssl/private/server.pem -out /etc/nginx/ssl/private/server.key 25 | /usr/bin/openssl req -new -key /etc/nginx/ssl/private/server.pem -out /etc/nginx/ssl/private/server.csr -subj "/C=CN/ST=myprovince/L=mycity/O=myorganization/OU=mygroup/CN=myServer" 26 | /usr/bin/openssl x509 -req -days 365 -sha1 -CA /etc/nginx/ssl/certs/ca.cer -CAkey /etc/nginx/ssl/private/ca.pem -CAserial /etc/nginx/ssl/ca.srl -CAcreateserial -in /etc/nginx/ssl/private/server.csr -out /etc/nginx/ssl/certs/server.cer 27 | 28 | #生成客户端证书 29 | /usr/bin/openssl genrsa -out /etc/nginx/ssl/private/client.pem 2048 30 | /usr/bin/openssl rsa -in /etc/nginx/ssl/private/client.pem -out /etc/nginx/ssl/private/client.key 31 | /usr/bin/openssl req -new -key /etc/nginx/ssl/private/client.pem -out /etc/nginx/ssl/private/client.csr -subj "/C=CN/ST=myprovince/L=mycity/O=myorganization/OU=mygroup/CN=myClient" 32 | /usr/bin/openssl x509 -req -days 365 -sha1 -CA /etc/nginx/ssl/certs/ca.cer -CAkey /etc/nginx/ssl/private/ca.pem -CAserial /etc/nginx/ssl/ca.srl -in /etc/nginx/ssl/private/client.csr -out /etc/nginx/ssl/certs/client.cer 33 | 34 | # 导出证书 35 | password='8888' 36 | /usr/bin/expect <<-EOF 37 | set timeout 30 38 | spawn /usr/bin/openssl pkcs12 -export -clcerts -inkey /etc/nginx/ssl/private/client.pem -in /etc/nginx/ssl/certs/client.cer -out /etc/nginx/ssl/certs/client.p12 39 | expect "*Password*" 40 | send "$password\r" 41 | sleep 1 42 | expect "*Password*" 43 | send "$password\r" 44 | sleep 1 45 | spawn /usr/bin/openssl pkcs12 -export -clcerts -inkey /etc/nginx/ssl/private/server.pem -in /etc/nginx/ssl/certs/server.cer -out /etc/nginx/ssl/certs/server.p12 46 | expect "*Password*" 47 | send "$password\r" 48 | sleep 1 49 | expect "*Password*" 50 | send "$password\r" 51 | interact 52 | expect eof 53 | EOF 54 | -------------------------------------------------------------------------------- /elasticsearch/es1/config/elasticsearch.yml: -------------------------------------------------------------------------------- 1 | cluster.name: "docker-cluster" 2 | network.host: 0.0.0.0 3 | 4 | # minimum_master_nodes need to be explicitly set when bound on a public IP 5 | # set to 1 to allow single node clusters 6 | # Details: https://github.com/elastic/elasticsearch/pull/17288 7 | discovery.zen.minimum_master_nodes: 1 8 | 9 | # ======================== Elasticsearch Configuration ========================= 10 | # 11 | # NOTE: Elasticsearch comes with reasonable defaults for most settings. 12 | # Before you set out to tweak and tune the configuration, make sure you 13 | # understand what are you trying to accomplish and the consequences. 14 | # 15 | # The primary way of configuring a node is via this file. This template lists 16 | # the most important settings you may want to configure for a production cluster. 17 | # 18 | # Please consult the documentation for further information on configuration options: 19 | # https://www.elastic.co/guide/en/elasticsearch/reference/index.html 20 | # 21 | # ---------------------------------- Cluster ----------------------------------- 22 | # 23 | # Use a descriptive name for your cluster: 24 | # 25 | #cluster.name: my-application 26 | # 27 | # ------------------------------------ Node ------------------------------------ 28 | # 29 | # Use a descriptive name for the node: 30 | # 31 | #node.name: node-1 32 | # 33 | # Add custom attributes to the node: 34 | # 35 | #node.attr.rack: r1 36 | # 37 | # ----------------------------------- Paths ------------------------------------ 38 | # 39 | # Path to directory where to store the data (separate multiple locations by comma): 40 | # 41 | #path.data: /path/to/data 42 | # 43 | # Path to log files: 44 | # 45 | #path.logs: /path/to/logs 46 | # 47 | # ----------------------------------- Memory ----------------------------------- 48 | # 49 | # Lock the memory on startup: 50 | # 51 | #bootstrap.memory_lock: true 52 | # 53 | # Make sure that the heap size is set to about half the memory available 54 | # on the system and that the owner of the process is allowed to use this 55 | # limit. 56 | # 57 | # Elasticsearch performs poorly when the system is swapping the memory. 58 | # 59 | # ---------------------------------- Network ----------------------------------- 60 | # 61 | # Set the bind address to a specific IP (IPv4 or IPv6): 62 | # 63 | #network.host: 192.168.0.1 64 | # 65 | # Set a custom port for HTTP: 66 | # 67 | #http.port: 9200 68 | # 69 | # For more information, consult the network module documentation. 70 | # 71 | # --------------------------------- Discovery ---------------------------------- 72 | # 73 | # Pass an initial list of hosts to perform discovery when new node is started: 74 | # The default list of hosts is ["127.0.0.1", "[::1]"] 75 | # 76 | #discovery.zen.ping.unicast.hosts: ["host1", "host2"] 77 | # 78 | # Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1): 79 | # 80 | #discovery.zen.minimum_master_nodes: 3 81 | # 82 | # For more information, consult the zen discovery module documentation. 83 | # 84 | # ---------------------------------- Gateway ----------------------------------- 85 | # 86 | # Block initial recovery after a full cluster restart until N nodes are started: 87 | # 88 | #gateway.recover_after_nodes: 3 89 | # 90 | # For more information, consult the gateway module documentation. 91 | # 92 | # ---------------------------------- Various ----------------------------------- 93 | # 94 | # Require explicit names when deleting indices: 95 | # 96 | #action.destructive_requires_name: true 97 | -------------------------------------------------------------------------------- /elasticsearch/es1/config/jvm.options: -------------------------------------------------------------------------------- 1 | ## JVM configuration 2 | 3 | ################################################################ 4 | ## IMPORTANT: JVM heap size 5 | ################################################################ 6 | ## 7 | ## You should always set the min and max JVM heap 8 | ## size to the same value. For example, to set 9 | ## the heap to 4 GB, set: 10 | ## 11 | ## -Xms4g 12 | ## -Xmx4g 13 | ## 14 | ## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html 15 | ## for more information 16 | ## 17 | ################################################################ 18 | 19 | # Xms represents the initial size of total heap space 20 | # Xmx represents the maximum size of total heap space 21 | 22 | -Xms512M 23 | -Xmx512M 24 | 25 | ################################################################ 26 | ## Expert settings 27 | ################################################################ 28 | ## 29 | ## All settings below this section are considered 30 | ## expert settings. Don't tamper with them unless 31 | ## you understand what you are doing 32 | ## 33 | ################################################################ 34 | 35 | ## GC configuration 36 | -XX:+UseConcMarkSweepGC 37 | -XX:CMSInitiatingOccupancyFraction=75 38 | -XX:+UseCMSInitiatingOccupancyOnly 39 | 40 | ## optimizations 41 | 42 | # pre-touch memory pages used by the JVM during initialization 43 | -XX:+AlwaysPreTouch 44 | 45 | ## basic 46 | 47 | # force the server VM (remove on 32-bit client JVMs) 48 | -server 49 | 50 | # explicitly set the stack size (reduce to 320k on 32-bit client JVMs) 51 | -Xss1m 52 | 53 | # set to headless, just in case 54 | -Djava.awt.headless=true 55 | 56 | # ensure UTF-8 encoding by default (e.g. filenames) 57 | -Dfile.encoding=UTF-8 58 | 59 | # use our provided JNA always versus the system one 60 | -Djna.nosys=true 61 | 62 | # use old-style file permissions on JDK9 63 | -Djdk.io.permissionsUseCanonicalPath=true 64 | 65 | # flags to configure Netty 66 | -Dio.netty.noUnsafe=true 67 | -Dio.netty.noKeySetOptimization=true 68 | -Dio.netty.recycler.maxCapacityPerThread=0 69 | 70 | # log4j 2 71 | -Dlog4j.shutdownHookEnabled=false 72 | -Dlog4j2.disable.jmx=true 73 | -Dlog4j.skipJansi=true 74 | 75 | ## heap dumps 76 | 77 | # generate a heap dump when an allocation from the Java heap fails 78 | # heap dumps are created in the working directory of the JVM 79 | -XX:+HeapDumpOnOutOfMemoryError 80 | 81 | # specify an alternative path for heap dumps 82 | # ensure the directory exists and has sufficient space 83 | #-XX:HeapDumpPath=${heap.dump.path} 84 | 85 | ## GC logging 86 | 87 | #-XX:+PrintGCDetails 88 | #-XX:+PrintGCTimeStamps 89 | #-XX:+PrintGCDateStamps 90 | #-XX:+PrintClassHistogram 91 | #-XX:+PrintTenuringDistribution 92 | #-XX:+PrintGCApplicationStoppedTime 93 | 94 | # log GC status to a file with time stamps 95 | # ensure the directory exists 96 | #-Xloggc:${loggc} 97 | 98 | # By default, the GC log file will not rotate. 99 | # By uncommenting the lines below, the GC log file 100 | # will be rotated every 128MB at most 32 times. 101 | #-XX:+UseGCLogFileRotation 102 | #-XX:NumberOfGCLogFiles=32 103 | #-XX:GCLogFileSize=128M 104 | 105 | # Elasticsearch 5.0.0 will throw an exception on unquoted field names in JSON. 106 | # If documents were already indexed with unquoted fields in a previous version 107 | # of Elasticsearch, some operations may throw errors. 108 | # 109 | # WARNING: This option will be removed in Elasticsearch 6.0.0 and is provided 110 | # only for migration purposes. 111 | #-Delasticsearch.json.allow_unquoted_field_names=true 112 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Docker化PHP环境 2 | 3 | ## 此构建参考学习:https://github.com/opso-code/docker-php 4 | 5 | ## 为合适自己的工作和开发环境而打造,for ninja911 6 | 7 | - 请配置docker的Registry mirrors为中国大陆的 daocloud.io(加速器) 8 | - 使用 **docker-compose up -d** 快速搭建php环境 9 | - 此构建基本全程使用国内镜像,构建速度杠杠的(除了php pecl和composer self-update外) 10 | 11 | ## 使用方法 12 | 13 | ### 基础配置 14 | 1. 安装Docker(官方默认会自带docker-compose 工具), 已经安装过的可以跳过此步 15 | 2. 对Docker Machine 设置里,配置`Setting->Daemon->Registry mirrors`,增加加速器URL,比如http://xxxx.m.daocloud.io 16 | 3. 对Docker Machine 设置里,配置`Setting->Shared Drives(Windows)/File Sharing(Mac)`, 增加共享目录。要保证容器你所挂载本地目录一定是配置的子目录。 正确设置举例 【Windows】Share配置“E”盘,容器挂载本地目录E:/works;【Mac】Share配置“/User”, 容器挂载本地目录/User/username/works 17 | 4. docker-compose.yaml 默认关闭了mysql,redis,mongodb,elasticsearch,如果需要请删除注释行. 18 | 19 | ### Docker-php使用 20 | - 【必】复制example.env到同级目录下,并重命名.env,命令操作 21 | ```shell 22 | cp ./example.env ./.env 23 | ``` 24 | - 【必】修改.env文件的配置。`LOCAL_STOARGE_PATH`=设置为此github clone的根目录。 比如/User/username/server/docker-php 25 | - 【必】修改.env文件的配置。`LOCAL_WEB_PATH`=设置为你开发项目的基础根目录, 比如/User/username/works 26 | - 【选】修改.env文件配置。`MYSQL_ROOT_PASSWORD`=设置MYSQL数据库初始化root的密码,默认为mysql2018 27 | - 【必】启动所有命令行执行 28 | ```shell 29 | docker-compose up -d 30 | ``` 31 | 32 | ### Nginx配置 33 | - 多个虚拟站点的配置,直接参考nginx/conf.d/demo.cfg, 复制粘贴demo.cfg在同目录下并重名为site1.conf, 并根据注释修改目录路径(以容器目录为准),重命名文件必须以`conf`扩展名结尾, 举例命令行 34 | ```shell 35 | cp ./nginx/conf.d/demo.cfg ./nginx/conf.d/site1.conf 36 | ``` 37 | - 开启HTTPS支持。 第一次进入nginx容器,命令行 38 | ```shell 39 | docker-compose exec nginx bash 40 | # 自动化生成相关证书,生成目录在容器目录/etc/nginx/ssl 41 | sh /usr/local/bin/docker-make-ssl.sh 42 | # 拷贝容器的所有证书到宿主机nginx/ca目录下 43 | cp -R /etc/nginx/ssl /etc/nginx/ca 44 | ``` 45 | 然后配置你的nginx虚拟站点conf,取消相关ssl_注释即可,默认开放443:443映射 46 | - 使用动态扩展库方法,复制nginx/my_modules/xxxx.so 文件到nginx容器里/etc/nginx/module/内,并修改nginx.conf文件,在worker_processes下一行追加 `load_module modules/xxxx.so;`,可以参考conf.d/nginx.default配置. 47 | 48 | ### PHP配置 49 | - 【Seaslog】的配置范本文件在宿主机php/ext/ini/seaslog.ini里,根据注释复制一下,然后进入PHP容器修改容器内的文件`/usr/local/etc/php/conf.d/docker-php-ext-seaslog.ini` 即可, 命令如下 50 | ```shell 51 | # 进入PHP容器 52 | docker-compose exec php bash 53 | # 修改容器内的seaslog扩展配置 54 | vi /usr/local/etc/php/conf.d/docker-php-ext-seaslog.ini 55 | ``` 56 | 57 | 58 | ## 环境构成 59 | 60 | 将 `php-fpm` 和 `nginx` 容器分开,通过 `php:9000` 端口通信 61 | 62 | ### php 63 | 64 | php镜像来自官方 `php:fpm`,目前最新稳定版本是 `7.2.8` 65 | 66 | 在此基础上添加了以下等扩展: 67 | 68 | - swoole-4.0.3 69 | - redis/hiredis 70 | - mysqli 71 | - pdo_mysql 72 | - mongodb 73 | - bz2 74 | - dba 75 | - GD 76 | - zip 77 | - pdo_sqlite 78 | - memcached 79 | - bcmath 80 | - openssl 81 | - mbstring 82 | - sockets 83 | - event 84 | - posix 85 | - pcntl 86 | - intl 87 | - xml 88 | - tidy 89 | - json 90 | - ldap 91 | - calendar 92 | - soap 93 | - gmp 94 | - msgpack 95 | - inotify 96 | - grpc 97 | - seaslog 98 | - molten 99 | - zlib 100 | - apcu (可选) 101 | - ... 102 | 103 | 支持运行基于swoole/phalcon/workerman的项目 104 | 105 | 手动添加了 `composer` 并替换了国内源,修改了时区(`Asia/Shanghai`) 106 | 107 | ### nginx 108 | 109 | 直接使用的 `nginx:latest` 镜像,需要挂载自己的PHP项目工作目录,并配置nginx/conf.d里各个站点 110 | 可以支持HTTPS 加密协议访问(单向、双向) 111 | 112 | ### mongodb 113 | 114 | 直接使用的 `mongodb:latest` 镜像,根据具体情况修改 `/data/mongodb` 本地映射的数据库文件夹,如不需要可注释掉,其他数据库同理。 115 | Windows 磁盘是NTFS/FAT32,不支持Ext4大文件,不能挂载,需要注释挂载, Windows下无解 116 | 117 | ### ElasticSearch 118 | 119 | 这里强制使用ES5.5.2版本。 如果需要安装IK,请自行配置容器插件目录(`/usr/share/elasticsearch/plugins`) 120 | 121 | ### Beanstalk 122 | 包含Beanstalkd + Aurora, 进入容器执行`/usr/local/aurora/aurora -c /usr/local/aurora/conf/aurora.toml`, 就可以启动Aurora 123 | 124 | 125 | ## 常用运行 126 | 127 | ```sh 128 | $ cd docker-php/ 129 | // 后台运行 130 | $ docker-compose up -d 131 | // 进入php容器bash环境 132 | $ docker-compose exec php bash 133 | ``` 134 | -------------------------------------------------------------------------------- /php/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.2-fpm 2 | 3 | LABEL maintainer="ninja911" 4 | 5 | ENV TIMEZONE Asia/Shanghai 6 | ENV SWOOLE_VERSION 4.0.3 7 | ENV PHALCON_VERSION 3.4.1 8 | 9 | # replace sources.list 10 | RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list \ 11 | && sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list \ 12 | && cp /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \ 13 | && echo "${TIMEZONE}" > /etc/timezone 14 | 15 | # init 16 | RUN apt-get update -y && \ 17 | apt-get install -y --no-install-recommends \ 18 | curl \ 19 | wget \ 20 | zip \ 21 | unzip \ 22 | vim \ 23 | git \ 24 | locales \ 25 | procps \ 26 | libz-dev \ 27 | libpq-dev \ 28 | libjpeg-dev \ 29 | libpng-dev \ 30 | libfreetype6-dev \ 31 | libssl-dev \ 32 | libmcrypt-dev \ 33 | libmemcached-dev \ 34 | libtool \ 35 | libicu-dev \ 36 | libxml2 \ 37 | libxml2-dev \ 38 | libgmp3-dev \ 39 | libevent-dev \ 40 | libzip-dev \ 41 | zlib1g-dev \ 42 | libldap2-dev \ 43 | libbz2-dev \ 44 | libjpeg62-turbo-dev \ 45 | libtidy-dev \ 46 | libsqlite3-dev \ 47 | libsqlite3-0 \ 48 | tmux \ 49 | keychain \ 50 | && rm -rf /var/lib/apt/lists/* 51 | 52 | # 替换VIM鼠标状态为非可视状态 53 | RUN sed -i 's/mouse\=a/mouse=v/g' /usr/share/vim/vim80/defaults.vim 54 | 55 | RUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && locale-gen 56 | 57 | ENV LANG=en_US.UTF-8 \ 58 | LC_ALL=en_US.UTF-8 59 | 60 | # install hiredis 61 | RUN wget --no-check-certificate https://gitee.com/oschina/hiredis/repository/archive/v0.13.3.zip -O hiredis.zip \ 62 | && mkdir -p hiredis \ 63 | && unzip hiredis.zip \ 64 | && rm hiredis.zip \ 65 | && ( \ 66 | cd hiredis \ 67 | && make -j$(nproc) \ 68 | && make install \ 69 | && ldconfig \ 70 | ) \ 71 | && rm -r hiredis 72 | 73 | # install php extentions 74 | RUN pecl channel-update pecl.php.net \ 75 | && docker-php-ext-configure gd \ 76 | --with-jpeg-dir=/usr/lib \ 77 | --with-freetype-dir=/usr/include/freetype2 \ 78 | --with-zlib-dir=/usr \ 79 | && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ 80 | && docker-php-ext-install -j$(nproc) dba bz2 calendar ldap zip json tidy xml pdo_sqlite bcmath mysqli pdo_mysql gd sockets pcntl intl soap gmp \ 81 | && pecl install msgpack \ 82 | && docker-php-ext-enable msgpack \ 83 | && pecl install seaslog \ 84 | && docker-php-ext-enable seaslog \ 85 | # 一般情况,不需要用户变量缓存,所以注释掉安装apcu 86 | # && printf "\n" | pecl install apcu \ 87 | # && docker-php-ext-enable apcu \ 88 | && pecl install mongodb \ 89 | && docker-php-ext-enable mongodb \ 90 | && pecl install memcached \ 91 | && docker-php-ext-enable memcached \ 92 | && pecl install redis \ 93 | && docker-php-ext-enable redis \ 94 | && pecl install inotify \ 95 | && docker-php-ext-enable inotify \ 96 | && pecl install grpc \ 97 | && docker-php-ext-enable grpc \ 98 | && echo "no\r\/usr/local/php-event/\ryes"|pecl install event \ 99 | && docker-php-ext-enable event \ 100 | && pecl clear-cache 101 | 102 | # install phalcon extention 103 | RUN wget --no-check-certificate https://gitee.com/mirrors/cphalcon/repository/archive/v${PHALCON_VERSION}.zip -O phalcon.zip \ 104 | && unzip phalcon.zip \ 105 | && rm phalcon.zip \ 106 | && ( \ 107 | cd cphalcon/build \ 108 | && ./install \ 109 | ) \ 110 | && rm -r cphalcon \ 111 | && docker-php-ext-enable phalcon 112 | 113 | 114 | # install swoole extention 115 | RUN wget --no-check-certificate https://gitee.com/swoole/swoole/repository/archive/v${SWOOLE_VERSION}.zip -O swoole.zip \ 116 | && mkdir -p swoole \ 117 | && unzip swoole.zip \ 118 | && rm swoole.zip \ 119 | && ( \ 120 | cd swoole \ 121 | && phpize \ 122 | && ./configure --enable-async-redis --enable-mysqlnd --enable-openssl \ 123 | && make -j$(nproc) \ 124 | && make install \ 125 | ) \ 126 | && rm -r swoole \ 127 | && docker-php-ext-enable swoole 128 | 129 | 130 | # install composer 131 | RUN curl -sS https://install.phpcomposer.com/installer | php \ 132 | && mv composer.phar /usr/local/bin/composer \ 133 | && composer self-update --clean-backups \ 134 | && composer config -g repo.packagist composer https://packagist.laravel-china.org 135 | 136 | # 对Seaslog默认存储目录增加www-data owner && 对Php默认bash登陆目录赋予www-data:www-data owner 137 | RUN chown -R www-data:www-data /var/log/www && chown -R www-data:www-data /var/www 138 | 139 | EXPOSE 9000 140 | CMD ["php-fpm"] -------------------------------------------------------------------------------- /docker-compose.yaml: -------------------------------------------------------------------------------- 1 | # 注意这里的vertion是docker-compose yaml格式的version 不同的version支持不同的语法 2 | version: '3' 3 | services: 4 | nginx: 5 | # 依赖关系 先跑php 6 | depends_on: 7 | - php 8 | #image: nginx:${NGINX_VERSION} 9 | build: nginx/ 10 | # 数据卷 11 | volumes: 12 | - ${LOCAL_STOARGE_PATH}/nginx/conf.d:/etc/nginx/conf.d:ro 13 | # 证书挂载保存,需要用的时候,进容器执行 sh /usr/local/bin/docker-make-ssl.sh,然后cp -R /etc/nginx/ssl /etc/nginx/ca 14 | - ${LOCAL_STOARGE_PATH}/nginx/ca:/etc/nginx/ca 15 | - ${LOCAL_STOARGE_PATH}/nginx/my_modules:/etc/nginx/my_modules:ro 16 | - ${LOCAL_WEB_PATH}:/works 17 | # 端口映射 18 | ports: 19 | - 80:80 20 | - 443:443 21 | 22 | # 容器名称 23 | container_name: nginx 24 | #restart: always 25 | php: 26 | build: php/ 27 | volumes: 28 | - ${LOCAL_WEB_PATH}:/works 29 | - ${LOCAL_STOARGE_PATH}/php/ext:/etc/php/my_ext 30 | - ${LOCAL_STOARGE_PATH}/php/php.ini:/usr/local/etc/php/php.ini:ro 31 | container_name: php 32 | #restart: always 33 | # es_n1: 34 | # image: daocloud.io/library/elasticsearch:${ELASTIC_VERSION} 35 | # #hostname: "{{.Node.Hostname}}-es_n1" 36 | # environment: 37 | # - TZ=Asia/Shanghai 38 | # #- discovery.zen.ping.unicast.hosts=elasticsearch 39 | # #- discovery.zen.minimum_master_nodes=1 40 | # #- ELASTIC_PASSWORD=${ELASTIC_PASSWORD} 41 | # - xpack.security.http.ssl.enabled=false 42 | # - xpack.security.transport.ssl.enabled=false 43 | # - xpack.security.enabled=false 44 | # # - xpack.license.self_generated.type=trial 45 | # - xpack.watcher.enabled=false 46 | # - xpack.monitoring.enabled=false 47 | # - cluster.name=DevOps 48 | # - node.name=es_n1 49 | # - network.host=0.0.0.0 50 | # - http.cors.enabled=true 51 | # - http.cors.allow-origin="*" 52 | # - bootstrap.memory_lock=true 53 | # # 设置elasticsearch服务的java虚拟机内存使用 54 | # - "ES_JAVA_OPTS=-Xms512m -Xmx512m" 55 | # # ES_JVM_OPTIONS仅最es 5.3.x有效 56 | # # - "ES_JVM_OPTIONS=-Xms512m -Xmx512m" 57 | # # - discovery.type="single-node" 58 | # ulimits: 59 | # memlock: 60 | # soft: -1 61 | # hard: -1 62 | # nproc: 65535 63 | # # 系统文件句柄打开数量限制 64 | # nofile: 65 | # soft: 65536 66 | # hard: 65536 67 | # # cap_add: 68 | # # - IPC_LOCK 69 | # volumes: 70 | # - ${LOCAL_STOARGE_PATH}/elasticsearch/es_n1/data:/usr/share/elasticsearch/data 71 | # # 默认注释下面2行,如果需要下次启动前限制内存大小,请删除下面2行注释. 72 | # #- ${LOCAL_STOARGE_PATH}/elasticsearch/es_n1/config/elasticsearch.yml:/etc/elasticsearch/elasticsearch.yml 73 | # #- ${LOCAL_STOARGE_PATH}/elasticsearch/es_n1/config/jvm.options:/etc/elasticsearch/jvm.options 74 | # ports: 75 | # - 9200:9200 76 | # - 9300:9300 77 | # container_name: es_n1 78 | #restart: always 79 | # MySQL数据库 80 | # mysql: 81 | # image: mysql:${MYSQL_VERSION} 82 | # command: --max_allowed_packet=20971520 83 | # # 配置环境变量 84 | # environment: 85 | # MYSQL_USER: root 86 | # MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} 87 | # MYSQL_ROOT_HOST: "%" 88 | # ports: 89 | # - 3306:3306 90 | # volumes: 91 | # # mysql 配置文件 92 | # - ${LOCAL_STOARGE_PATH}/mysql/conf.d:/etc/mysql/conf.d:ro 93 | # # mysql 配置文件 94 | # - ${LOCAL_STOARGE_PATH}/mysql/mysql.conf.d:/etc/mysql/mysql.conf.d:ro 95 | # # mysql 数据库 96 | # - ${LOCAL_STOARGE_PATH}/mysql/db:/var/lib/mysql 97 | # # mysql 日志 98 | # - ${LOCAL_STOARGE_PATH}/mysql/logs:/var/log/mysql 99 | # container_name: mysql 100 | #restart: always 101 | # redis: 102 | # image: redis:${REDIS_VERSION} 103 | # volumes: 104 | # # redis 配置文件 105 | # - ${LOCAL_STOARGE_PATH}/redis/conf.d/redis.conf:/etc/redis/redis.conf:ro 106 | # # redis 持久化数据存储 107 | # - ${LOCAL_STOARGE_PATH}/redis/db:/data/redis 108 | # # 以配置文件启动 redis 109 | # ports: 110 | # - 6379:6379 111 | # container_name: redis 112 | #restart: always 113 | # Beanstalk Server 114 | # beanstalk: 115 | # build: beanstalk/ 116 | # environment: 117 | # - TZ=Asia/Shanghai 118 | # - BEANSTALKD_VERSION=${BEANSTALKD_VERSION} 119 | # - BEANSTALKD_PORT=${BEANSTALKD_PORT} 120 | # - BEANSTALKD_ADDR=${BEANSTALKD_ADDR} 121 | # - BEANSTALKD_MAX_JOB_SIZE=${BEANSTALKD_MAX_JOB_SIZE} 122 | # ports: 123 | # - 11300:${BEANSTALKD_PORT} 124 | # - 3000:3000 125 | # volumes: 126 | # - ${LOCAL_STOARGE_PATH}/beanstalk/data/beanstalkd/:/data/beanstalkd/ 127 | # - ${LOCAL_STOARGE_PATH}/beanstalk/aurora/conf/:/usr/local/aurora/conf/:cached 128 | # container_name: beanstalk 129 | #restart: always 130 | #mongo: 131 | # image: mongo:latest 132 | # volumes: 133 | # # Windows 磁盘是NTFS/FAT32,不支持Ext4大文件,不能挂载,需要注释下行, Windows下无解 134 | # #- ${LOCAL_STOARGE_PATH}/mongo/db:/data/db 135 | # - ${LOCAL_STOARGE_PATH}/mongo/logs:/var/log/mongodb 136 | # ports: 137 | # - 27017:27017 138 | # container_name: mongo 139 | #restart: always -------------------------------------------------------------------------------- /redis/conf.d/redis.conf: -------------------------------------------------------------------------------- 1 | # Redis configuration file example. 2 | # 3 | # Note that in order to read the configuration file, Redis must be 4 | # started with the file path as first argument: 5 | # 6 | # ./redis-server /path/to/redis.conf 7 | 8 | # Note on units: when memory size is needed, it is possible to specify 9 | # it in the usual form of 1k 5GB 4M and so forth: 10 | # 11 | # 1k => 1000 bytes 12 | # 1kb => 1024 bytes 13 | # 1m => 1000000 bytes 14 | # 1mb => 1024*1024 bytes 15 | # 1g => 1000000000 bytes 16 | # 1gb => 1024*1024*1024 bytes 17 | # 18 | # units are case insensitive so 1GB 1Gb 1gB are all the same. 19 | 20 | ################################## INCLUDES ################################### 21 | 22 | # Include one or more other config files here. This is useful if you 23 | # have a standard template that goes to all Redis servers but also need 24 | # to customize a few per-server settings. Include files can include 25 | # other files, so use this wisely. 26 | # 27 | # Notice option "include" won't be rewritten by command "CONFIG REWRITE" 28 | # from admin or Redis Sentinel. Since Redis always uses the last processed 29 | # line as value of a configuration directive, you'd better put includes 30 | # at the beginning of this file to avoid overwriting config change at runtime. 31 | # 32 | # If instead you are interested in using includes to override configuration 33 | # options, it is better to use include as the last line. 34 | # 35 | # include /path/to/local.conf 36 | # include /path/to/other.conf 37 | 38 | ################################## MODULES ##################################### 39 | 40 | # Load modules at startup. If the server is not able to load modules 41 | # it will abort. It is possible to use multiple loadmodule directives. 42 | # 43 | # loadmodule /path/to/my_module.so 44 | # loadmodule /path/to/other_module.so 45 | 46 | ################################## NETWORK ##################################### 47 | 48 | # By default, if no "bind" configuration directive is specified, Redis listens 49 | # for connections from all the network interfaces available on the server. 50 | # It is possible to listen to just one or multiple selected interfaces using 51 | # the "bind" configuration directive, followed by one or more IP addresses. 52 | # 53 | # Examples: 54 | # 55 | # bind 192.168.1.100 10.0.0.1 56 | # bind 127.0.0.1 ::1 57 | # 58 | # ~~~ WARNING ~~~ If the computer running Redis is directly exposed to the 59 | # internet, binding to all the interfaces is dangerous and will expose the 60 | # instance to everybody on the internet. So by default we uncomment the 61 | # following bind directive, that will force Redis to listen only into 62 | # the IPv4 lookback interface address (this means Redis will be able to 63 | # accept connections only from clients running into the same computer it 64 | # is running). 65 | # 66 | # IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES 67 | # JUST COMMENT THE FOLLOWING LINE. 68 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 69 | bind redis 70 | 71 | # Protected mode is a layer of security protection, in order to avoid that 72 | # Redis instances left open on the internet are accessed and exploited. 73 | # 74 | # When protected mode is on and if: 75 | # 76 | # 1) The server is not binding explicitly to a set of addresses using the 77 | # "bind" directive. 78 | # 2) No password is configured. 79 | # 80 | # The server only accepts connections from clients connecting from the 81 | # IPv4 and IPv6 loopback addresses 127.0.0.1 and ::1, and from Unix domain 82 | # sockets. 83 | # 84 | # By default protected mode is enabled. You should disable it only if 85 | # you are sure you want clients from other hosts to connect to Redis 86 | # even if no authentication is configured, nor a specific set of interfaces 87 | # are explicitly listed using the "bind" directive. 88 | protected-mode yes 89 | 90 | # Accept connections on the specified port, default is 6379 (IANA #815344). 91 | # If port 0 is specified Redis will not listen on a TCP socket. 92 | port 6379 93 | 94 | # TCP listen() backlog. 95 | # 96 | # In high requests-per-second environments you need an high backlog in order 97 | # to avoid slow clients connections issues. Note that the Linux kernel 98 | # will silently truncate it to the value of /proc/sys/net/core/somaxconn so 99 | # make sure to raise both the value of somaxconn and tcp_max_syn_backlog 100 | # in order to get the desired effect. 101 | tcp-backlog 511 102 | 103 | # Unix socket. 104 | # 105 | # Specify the path for the Unix socket that will be used to listen for 106 | # incoming connections. There is no default, so Redis will not listen 107 | # on a unix socket when not specified. 108 | # 109 | # unixsocket /tmp/redis.sock 110 | # unixsocketperm 700 111 | 112 | # Close the connection after a client is idle for N seconds (0 to disable) 113 | timeout 0 114 | 115 | # TCP keepalive. 116 | # 117 | # If non-zero, use SO_KEEPALIVE to send TCP ACKs to clients in absence 118 | # of communication. This is useful for two reasons: 119 | # 120 | # 1) Detect dead peers. 121 | # 2) Take the connection alive from the point of view of network 122 | # equipment in the middle. 123 | # 124 | # On Linux, the specified value (in seconds) is the period used to send ACKs. 125 | # Note that to close the connection the double of the time is needed. 126 | # On other kernels the period depends on the kernel configuration. 127 | # 128 | # A reasonable value for this option is 300 seconds, which is the new 129 | # Redis default starting with Redis 3.2.1. 130 | tcp-keepalive 300 131 | 132 | ################################# GENERAL ##################################### 133 | 134 | # By default Redis does not run as a daemon. Use 'yes' if you need it. 135 | # Note that Redis will write a pid file in /usr/local/var/run/redis.pid when daemonized. 136 | daemonize no 137 | 138 | # If you run Redis from upstart or systemd, Redis can interact with your 139 | # supervision tree. Options: 140 | # supervised no - no supervision interaction 141 | # supervised upstart - signal upstart by putting Redis into SIGSTOP mode 142 | # supervised systemd - signal systemd by writing READY=1 to $NOTIFY_SOCKET 143 | # supervised auto - detect upstart or systemd method based on 144 | # UPSTART_JOB or NOTIFY_SOCKET environment variables 145 | # Note: these supervision methods only signal "process is ready." 146 | # They do not enable continuous liveness pings back to your supervisor. 147 | supervised no 148 | 149 | # If a pid file is specified, Redis writes it where specified at startup 150 | # and removes it at exit. 151 | # 152 | # When the server runs non daemonized, no pid file is created if none is 153 | # specified in the configuration. When the server is daemonized, the pid file 154 | # is used even if not specified, defaulting to "/usr/local/var/run/redis.pid". 155 | # 156 | # Creating a pid file is best effort: if Redis is not able to create it 157 | # nothing bad happens, the server will start and run normally. 158 | pidfile /var/run/redis_6379.pid 159 | 160 | # Specify the server verbosity level. 161 | # This can be one of: 162 | # debug (a lot of information, useful for development/testing) 163 | # verbose (many rarely useful info, but not a mess like the debug level) 164 | # notice (moderately verbose, what you want in production probably) 165 | # warning (only very important / critical messages are logged) 166 | loglevel notice 167 | 168 | # Specify the log file name. Also the empty string can be used to force 169 | # Redis to log on the standard output. Note that if you use standard 170 | # output for logging but daemonize, logs will be sent to /dev/null 171 | logfile "" 172 | 173 | # To enable logging to the system logger, just set 'syslog-enabled' to yes, 174 | # and optionally update the other syslog parameters to suit your needs. 175 | # syslog-enabled no 176 | 177 | # Specify the syslog identity. 178 | # syslog-ident redis 179 | 180 | # Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7. 181 | # syslog-facility local0 182 | 183 | # Set the number of databases. The default database is DB 0, you can select 184 | # a different one on a per-connection basis using SELECT where 185 | # dbid is a number between 0 and 'databases'-1 186 | databases 16 187 | 188 | # By default Redis shows an ASCII art logo only when started to log to the 189 | # standard output and if the standard output is a TTY. Basically this means 190 | # that normally a logo is displayed only in interactive sessions. 191 | # 192 | # However it is possible to force the pre-4.0 behavior and always show a 193 | # ASCII art logo in startup logs by setting the following option to yes. 194 | always-show-logo yes 195 | 196 | ################################ SNAPSHOTTING ################################ 197 | # 198 | # Save the DB on disk: 199 | # 200 | # save 201 | # 202 | # Will save the DB if both the given number of seconds and the given 203 | # number of write operations against the DB occurred. 204 | # 205 | # In the example below the behaviour will be to save: 206 | # after 900 sec (15 min) if at least 1 key changed 207 | # after 300 sec (5 min) if at least 10 keys changed 208 | # after 60 sec if at least 10000 keys changed 209 | # 210 | # Note: you can disable saving completely by commenting out all "save" lines. 211 | # 212 | # It is also possible to remove all the previously configured save 213 | # points by adding a save directive with a single empty string argument 214 | # like in the following example: 215 | # 216 | # save "" 217 | 218 | save 900 1 219 | save 300 10 220 | save 60 10000 221 | 222 | # By default Redis will stop accepting writes if RDB snapshots are enabled 223 | # (at least one save point) and the latest background save failed. 224 | # This will make the user aware (in a hard way) that data is not persisting 225 | # on disk properly, otherwise chances are that no one will notice and some 226 | # disaster will happen. 227 | # 228 | # If the background saving process will start working again Redis will 229 | # automatically allow writes again. 230 | # 231 | # However if you have setup your proper monitoring of the Redis server 232 | # and persistence, you may want to disable this feature so that Redis will 233 | # continue to work as usual even if there are problems with disk, 234 | # permissions, and so forth. 235 | stop-writes-on-bgsave-error yes 236 | 237 | # Compress string objects using LZF when dump .rdb databases? 238 | # For default that's set to 'yes' as it's almost always a win. 239 | # If you want to save some CPU in the saving child set it to 'no' but 240 | # the dataset will likely be bigger if you have compressible values or keys. 241 | rdbcompression yes 242 | 243 | # Since version 5 of RDB a CRC64 checksum is placed at the end of the file. 244 | # This makes the format more resistant to corruption but there is a performance 245 | # hit to pay (around 10%) when saving and loading RDB files, so you can disable it 246 | # for maximum performances. 247 | # 248 | # RDB files created with checksum disabled have a checksum of zero that will 249 | # tell the loading code to skip the check. 250 | rdbchecksum yes 251 | 252 | # The filename where to dump the DB 253 | dbfilename dump.rdb 254 | 255 | # The working directory. 256 | # 257 | # The DB will be written inside this directory, with the filename specified 258 | # above using the 'dbfilename' configuration directive. 259 | # 260 | # The Append Only File will also be created inside this directory. 261 | # 262 | # Note that you must specify a directory here, not a file name. 263 | dir /data/redis 264 | 265 | ################################# REPLICATION ################################# 266 | 267 | # Master-Slave replication. Use slaveof to make a Redis instance a copy of 268 | # another Redis server. A few things to understand ASAP about Redis replication. 269 | # 270 | # 1) Redis replication is asynchronous, but you can configure a master to 271 | # stop accepting writes if it appears to be not connected with at least 272 | # a given number of slaves. 273 | # 2) Redis slaves are able to perform a partial resynchronization with the 274 | # master if the replication link is lost for a relatively small amount of 275 | # time. You may want to configure the replication backlog size (see the next 276 | # sections of this file) with a sensible value depending on your needs. 277 | # 3) Replication is automatic and does not need user intervention. After a 278 | # network partition slaves automatically try to reconnect to masters 279 | # and resynchronize with them. 280 | # 281 | # slaveof 282 | 283 | # If the master is password protected (using the "requirepass" configuration 284 | # directive below) it is possible to tell the slave to authenticate before 285 | # starting the replication synchronization process, otherwise the master will 286 | # refuse the slave request. 287 | # 288 | # masterauth 289 | 290 | # When a slave loses its connection with the master, or when the replication 291 | # is still in progress, the slave can act in two different ways: 292 | # 293 | # 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will 294 | # still reply to client requests, possibly with out of date data, or the 295 | # data set may just be empty if this is the first synchronization. 296 | # 297 | # 2) if slave-serve-stale-data is set to 'no' the slave will reply with 298 | # an error "SYNC with master in progress" to all the kind of commands 299 | # but to INFO and SLAVEOF. 300 | # 301 | slave-serve-stale-data yes 302 | 303 | # You can configure a slave instance to accept writes or not. Writing against 304 | # a slave instance may be useful to store some ephemeral data (because data 305 | # written on a slave will be easily deleted after resync with the master) but 306 | # may also cause problems if clients are writing to it because of a 307 | # misconfiguration. 308 | # 309 | # Since Redis 2.6 by default slaves are read-only. 310 | # 311 | # Note: read only slaves are not designed to be exposed to untrusted clients 312 | # on the internet. It's just a protection layer against misuse of the instance. 313 | # Still a read only slave exports by default all the administrative commands 314 | # such as CONFIG, DEBUG, and so forth. To a limited extent you can improve 315 | # security of read only slaves using 'rename-command' to shadow all the 316 | # administrative / dangerous commands. 317 | slave-read-only yes 318 | 319 | # Replication SYNC strategy: disk or socket. 320 | # 321 | # ------------------------------------------------------- 322 | # WARNING: DISKLESS REPLICATION IS EXPERIMENTAL CURRENTLY 323 | # ------------------------------------------------------- 324 | # 325 | # New slaves and reconnecting slaves that are not able to continue the replication 326 | # process just receiving differences, need to do what is called a "full 327 | # synchronization". An RDB file is transmitted from the master to the slaves. 328 | # The transmission can happen in two different ways: 329 | # 330 | # 1) Disk-backed: The Redis master creates a new process that writes the RDB 331 | # file on disk. Later the file is transferred by the parent 332 | # process to the slaves incrementally. 333 | # 2) Diskless: The Redis master creates a new process that directly writes the 334 | # RDB file to slave sockets, without touching the disk at all. 335 | # 336 | # With disk-backed replication, while the RDB file is generated, more slaves 337 | # can be queued and served with the RDB file as soon as the current child producing 338 | # the RDB file finishes its work. With diskless replication instead once 339 | # the transfer starts, new slaves arriving will be queued and a new transfer 340 | # will start when the current one terminates. 341 | # 342 | # When diskless replication is used, the master waits a configurable amount of 343 | # time (in seconds) before starting the transfer in the hope that multiple slaves 344 | # will arrive and the transfer can be parallelized. 345 | # 346 | # With slow disks and fast (large bandwidth) networks, diskless replication 347 | # works better. 348 | repl-diskless-sync no 349 | 350 | # When diskless replication is enabled, it is possible to configure the delay 351 | # the server waits in order to spawn the child that transfers the RDB via socket 352 | # to the slaves. 353 | # 354 | # This is important since once the transfer starts, it is not possible to serve 355 | # new slaves arriving, that will be queued for the next RDB transfer, so the server 356 | # waits a delay in order to let more slaves arrive. 357 | # 358 | # The delay is specified in seconds, and by default is 5 seconds. To disable 359 | # it entirely just set it to 0 seconds and the transfer will start ASAP. 360 | repl-diskless-sync-delay 5 361 | 362 | # Slaves send PINGs to server in a predefined interval. It's possible to change 363 | # this interval with the repl_ping_slave_period option. The default value is 10 364 | # seconds. 365 | # 366 | # repl-ping-slave-period 10 367 | 368 | # The following option sets the replication timeout for: 369 | # 370 | # 1) Bulk transfer I/O during SYNC, from the point of view of slave. 371 | # 2) Master timeout from the point of view of slaves (data, pings). 372 | # 3) Slave timeout from the point of view of masters (REPLCONF ACK pings). 373 | # 374 | # It is important to make sure that this value is greater than the value 375 | # specified for repl-ping-slave-period otherwise a timeout will be detected 376 | # every time there is low traffic between the master and the slave. 377 | # 378 | # repl-timeout 60 379 | 380 | # Disable TCP_NODELAY on the slave socket after SYNC? 381 | # 382 | # If you select "yes" Redis will use a smaller number of TCP packets and 383 | # less bandwidth to send data to slaves. But this can add a delay for 384 | # the data to appear on the slave side, up to 40 milliseconds with 385 | # Linux kernels using a default configuration. 386 | # 387 | # If you select "no" the delay for data to appear on the slave side will 388 | # be reduced but more bandwidth will be used for replication. 389 | # 390 | # By default we optimize for low latency, but in very high traffic conditions 391 | # or when the master and slaves are many hops away, turning this to "yes" may 392 | # be a good idea. 393 | repl-disable-tcp-nodelay no 394 | 395 | # Set the replication backlog size. The backlog is a buffer that accumulates 396 | # slave data when slaves are disconnected for some time, so that when a slave 397 | # wants to reconnect again, often a full resync is not needed, but a partial 398 | # resync is enough, just passing the portion of data the slave missed while 399 | # disconnected. 400 | # 401 | # The bigger the replication backlog, the longer the time the slave can be 402 | # disconnected and later be able to perform a partial resynchronization. 403 | # 404 | # The backlog is only allocated once there is at least a slave connected. 405 | # 406 | # repl-backlog-size 1mb 407 | 408 | # After a master has no longer connected slaves for some time, the backlog 409 | # will be freed. The following option configures the amount of seconds that 410 | # need to elapse, starting from the time the last slave disconnected, for 411 | # the backlog buffer to be freed. 412 | # 413 | # Note that slaves never free the backlog for timeout, since they may be 414 | # promoted to masters later, and should be able to correctly "partially 415 | # resynchronize" with the slaves: hence they should always accumulate backlog. 416 | # 417 | # A value of 0 means to never release the backlog. 418 | # 419 | # repl-backlog-ttl 3600 420 | 421 | # The slave priority is an integer number published by Redis in the INFO output. 422 | # It is used by Redis Sentinel in order to select a slave to promote into a 423 | # master if the master is no longer working correctly. 424 | # 425 | # A slave with a low priority number is considered better for promotion, so 426 | # for instance if there are three slaves with priority 10, 100, 25 Sentinel will 427 | # pick the one with priority 10, that is the lowest. 428 | # 429 | # However a special priority of 0 marks the slave as not able to perform the 430 | # role of master, so a slave with priority of 0 will never be selected by 431 | # Redis Sentinel for promotion. 432 | # 433 | # By default the priority is 100. 434 | slave-priority 100 435 | 436 | # It is possible for a master to stop accepting writes if there are less than 437 | # N slaves connected, having a lag less or equal than M seconds. 438 | # 439 | # The N slaves need to be in "online" state. 440 | # 441 | # The lag in seconds, that must be <= the specified value, is calculated from 442 | # the last ping received from the slave, that is usually sent every second. 443 | # 444 | # This option does not GUARANTEE that N replicas will accept the write, but 445 | # will limit the window of exposure for lost writes in case not enough slaves 446 | # are available, to the specified number of seconds. 447 | # 448 | # For example to require at least 3 slaves with a lag <= 10 seconds use: 449 | # 450 | # min-slaves-to-write 3 451 | # min-slaves-max-lag 10 452 | # 453 | # Setting one or the other to 0 disables the feature. 454 | # 455 | # By default min-slaves-to-write is set to 0 (feature disabled) and 456 | # min-slaves-max-lag is set to 10. 457 | 458 | # A Redis master is able to list the address and port of the attached 459 | # slaves in different ways. For example the "INFO replication" section 460 | # offers this information, which is used, among other tools, by 461 | # Redis Sentinel in order to discover slave instances. 462 | # Another place where this info is available is in the output of the 463 | # "ROLE" command of a master. 464 | # 465 | # The listed IP and address normally reported by a slave is obtained 466 | # in the following way: 467 | # 468 | # IP: The address is auto detected by checking the peer address 469 | # of the socket used by the slave to connect with the master. 470 | # 471 | # Port: The port is communicated by the slave during the replication 472 | # handshake, and is normally the port that the slave is using to 473 | # list for connections. 474 | # 475 | # However when port forwarding or Network Address Translation (NAT) is 476 | # used, the slave may be actually reachable via different IP and port 477 | # pairs. The following two options can be used by a slave in order to 478 | # report to its master a specific set of IP and port, so that both INFO 479 | # and ROLE will report those values. 480 | # 481 | # There is no need to use both the options if you need to override just 482 | # the port or the IP address. 483 | # 484 | # slave-announce-ip 5.5.5.5 485 | # slave-announce-port 1234 486 | 487 | ################################## SECURITY ################################### 488 | 489 | # Require clients to issue AUTH before processing any other 490 | # commands. This might be useful in environments in which you do not trust 491 | # others with access to the host running redis-server. 492 | # 493 | # This should stay commented out for backward compatibility and because most 494 | # people do not need auth (e.g. they run their own servers). 495 | # 496 | # Warning: since Redis is pretty fast an outside user can try up to 497 | # 150k passwords per second against a good box. This means that you should 498 | # use a very strong password otherwise it will be very easy to break. 499 | # 500 | requirepass clever 501 | 502 | # Command renaming. 503 | # 504 | # It is possible to change the name of dangerous commands in a shared 505 | # environment. For instance the CONFIG command may be renamed into something 506 | # hard to guess so that it will still be available for internal-use tools 507 | # but not available for general clients. 508 | # 509 | # Example: 510 | # 511 | # rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52 512 | # 513 | # It is also possible to completely kill a command by renaming it into 514 | # an empty string: 515 | # 516 | # rename-command CONFIG "" 517 | # 518 | # Please note that changing the name of commands that are logged into the 519 | # AOF file or transmitted to slaves may cause problems. 520 | 521 | ################################### CLIENTS #################################### 522 | 523 | # Set the max number of connected clients at the same time. By default 524 | # this limit is set to 10000 clients, however if the Redis server is not 525 | # able to configure the process file limit to allow for the specified limit 526 | # the max number of allowed clients is set to the current file limit 527 | # minus 32 (as Redis reserves a few file descriptors for internal uses). 528 | # 529 | # Once the limit is reached Redis will close all the new connections sending 530 | # an error 'max number of clients reached'. 531 | # 532 | # maxclients 10000 533 | 534 | ############################## MEMORY MANAGEMENT ################################ 535 | 536 | # Set a memory usage limit to the specified amount of bytes. 537 | # When the memory limit is reached Redis will try to remove keys 538 | # according to the eviction policy selected (see maxmemory-policy). 539 | # 540 | # If Redis can't remove keys according to the policy, or if the policy is 541 | # set to 'noeviction', Redis will start to reply with errors to commands 542 | # that would use more memory, like SET, LPUSH, and so on, and will continue 543 | # to reply to read-only commands like GET. 544 | # 545 | # This option is usually useful when using Redis as an LRU or LFU cache, or to 546 | # set a hard memory limit for an instance (using the 'noeviction' policy). 547 | # 548 | # WARNING: If you have slaves attached to an instance with maxmemory on, 549 | # the size of the output buffers needed to feed the slaves are subtracted 550 | # from the used memory count, so that network problems / resyncs will 551 | # not trigger a loop where keys are evicted, and in turn the output 552 | # buffer of slaves is full with DELs of keys evicted triggering the deletion 553 | # of more keys, and so forth until the database is completely emptied. 554 | # 555 | # In short... if you have slaves attached it is suggested that you set a lower 556 | # limit for maxmemory so that there is some free RAM on the system for slave 557 | # output buffers (but this is not needed if the policy is 'noeviction'). 558 | # 559 | # maxmemory 560 | 561 | # MAXMEMORY POLICY: how Redis will select what to remove when maxmemory 562 | # is reached. You can select among five behaviors: 563 | # 564 | # volatile-lru -> Evict using approximated LRU among the keys with an expire set. 565 | # allkeys-lru -> Evict any key using approximated LRU. 566 | # volatile-lfu -> Evict using approximated LFU among the keys with an expire set. 567 | # allkeys-lfu -> Evict any key using approximated LFU. 568 | # volatile-random -> Remove a random key among the ones with an expire set. 569 | # allkeys-random -> Remove a random key, any key. 570 | # volatile-ttl -> Remove the key with the nearest expire time (minor TTL) 571 | # noeviction -> Don't evict anything, just return an error on write operations. 572 | # 573 | # LRU means Least Recently Used 574 | # LFU means Least Frequently Used 575 | # 576 | # Both LRU, LFU and volatile-ttl are implemented using approximated 577 | # randomized algorithms. 578 | # 579 | # Note: with any of the above policies, Redis will return an error on write 580 | # operations, when there are no suitable keys for eviction. 581 | # 582 | # At the date of writing these commands are: set setnx setex append 583 | # incr decr rpush lpush rpushx lpushx linsert lset rpoplpush sadd 584 | # sinter sinterstore sunion sunionstore sdiff sdiffstore zadd zincrby 585 | # zunionstore zinterstore hset hsetnx hmset hincrby incrby decrby 586 | # getset mset msetnx exec sort 587 | # 588 | # The default is: 589 | # 590 | # maxmemory-policy noeviction 591 | 592 | # LRU, LFU and minimal TTL algorithms are not precise algorithms but approximated 593 | # algorithms (in order to save memory), so you can tune it for speed or 594 | # accuracy. For default Redis will check five keys and pick the one that was 595 | # used less recently, you can change the sample size using the following 596 | # configuration directive. 597 | # 598 | # The default of 5 produces good enough results. 10 Approximates very closely 599 | # true LRU but costs more CPU. 3 is faster but not very accurate. 600 | # 601 | # maxmemory-samples 5 602 | 603 | ############################# LAZY FREEING #################################### 604 | 605 | # Redis has two primitives to delete keys. One is called DEL and is a blocking 606 | # deletion of the object. It means that the server stops processing new commands 607 | # in order to reclaim all the memory associated with an object in a synchronous 608 | # way. If the key deleted is associated with a small object, the time needed 609 | # in order to execute th DEL command is very small and comparable to most other 610 | # O(1) or O(log_N) commands in Redis. However if the key is associated with an 611 | # aggregated value containing millions of elements, the server can block for 612 | # a long time (even seconds) in order to complete the operation. 613 | # 614 | # For the above reasons Redis also offers non blocking deletion primitives 615 | # such as UNLINK (non blocking DEL) and the ASYNC option of FLUSHALL and 616 | # FLUSHDB commands, in order to reclaim memory in background. Those commands 617 | # are executed in constant time. Another thread will incrementally free the 618 | # object in the background as fast as possible. 619 | # 620 | # DEL, UNLINK and ASYNC option of FLUSHALL and FLUSHDB are user-controlled. 621 | # It's up to the design of the application to understand when it is a good 622 | # idea to use one or the other. However the Redis server sometimes has to 623 | # delete keys or flush the whole database as a side effect of other operations. 624 | # Specifically Redis deletes objects independently of an user call in the 625 | # following scenarios: 626 | # 627 | # 1) On eviction, because of the maxmemory and maxmemory policy configurations, 628 | # in order to make room for new data, without going over the specified 629 | # memory limit. 630 | # 2) Because of expire: when a key with an associated time to live (see the 631 | # EXPIRE command) must be deleted from memory. 632 | # 3) Because of a side effect of a command that stores data on a key that may 633 | # already exist. For example the RENAME command may delete the old key 634 | # content when it is replaced with another one. Similarly SUNIONSTORE 635 | # or SORT with STORE option may delete existing keys. The SET command 636 | # itself removes any old content of the specified key in order to replace 637 | # it with the specified string. 638 | # 4) During replication, when a slave performs a full resynchronization with 639 | # its master, the content of the whole database is removed in order to 640 | # load the RDB file just transfered. 641 | # 642 | # In all the above cases the default is to delete objects in a blocking way, 643 | # like if DEL was called. However you can configure each case specifically 644 | # in order to instead release memory in a non-blocking way like if UNLINK 645 | # was called, using the following configuration directives: 646 | 647 | lazyfree-lazy-eviction no 648 | lazyfree-lazy-expire no 649 | lazyfree-lazy-server-del no 650 | slave-lazy-flush no 651 | 652 | ############################## APPEND ONLY MODE ############################### 653 | 654 | # By default Redis asynchronously dumps the dataset on disk. This mode is 655 | # good enough in many applications, but an issue with the Redis process or 656 | # a power outage may result into a few minutes of writes lost (depending on 657 | # the configured save points). 658 | # 659 | # The Append Only File is an alternative persistence mode that provides 660 | # much better durability. For instance using the default data fsync policy 661 | # (see later in the config file) Redis can lose just one second of writes in a 662 | # dramatic event like a server power outage, or a single write if something 663 | # wrong with the Redis process itself happens, but the operating system is 664 | # still running correctly. 665 | # 666 | # AOF and RDB persistence can be enabled at the same time without problems. 667 | # If the AOF is enabled on startup Redis will load the AOF, that is the file 668 | # with the better durability guarantees. 669 | # 670 | # Please check http://redis.io/topics/persistence for more information. 671 | 672 | appendonly no 673 | 674 | # The name of the append only file (default: "appendonly.aof") 675 | 676 | appendfilename "appendonly.aof" 677 | 678 | # The fsync() call tells the Operating System to actually write data on disk 679 | # instead of waiting for more data in the output buffer. Some OS will really flush 680 | # data on disk, some other OS will just try to do it ASAP. 681 | # 682 | # Redis supports three different modes: 683 | # 684 | # no: don't fsync, just let the OS flush the data when it wants. Faster. 685 | # always: fsync after every write to the append only log. Slow, Safest. 686 | # everysec: fsync only one time every second. Compromise. 687 | # 688 | # The default is "everysec", as that's usually the right compromise between 689 | # speed and data safety. It's up to you to understand if you can relax this to 690 | # "no" that will let the operating system flush the output buffer when 691 | # it wants, for better performances (but if you can live with the idea of 692 | # some data loss consider the default persistence mode that's snapshotting), 693 | # or on the contrary, use "always" that's very slow but a bit safer than 694 | # everysec. 695 | # 696 | # More details please check the following article: 697 | # http://antirez.com/post/redis-persistence-demystified.html 698 | # 699 | # If unsure, use "everysec". 700 | 701 | # appendfsync always 702 | appendfsync everysec 703 | # appendfsync no 704 | 705 | # When the AOF fsync policy is set to always or everysec, and a background 706 | # saving process (a background save or AOF log background rewriting) is 707 | # performing a lot of I/O against the disk, in some Linux configurations 708 | # Redis may block too long on the fsync() call. Note that there is no fix for 709 | # this currently, as even performing fsync in a different thread will block 710 | # our synchronous write(2) call. 711 | # 712 | # In order to mitigate this problem it's possible to use the following option 713 | # that will prevent fsync() from being called in the main process while a 714 | # BGSAVE or BGREWRITEAOF is in progress. 715 | # 716 | # This means that while another child is saving, the durability of Redis is 717 | # the same as "appendfsync none". In practical terms, this means that it is 718 | # possible to lose up to 30 seconds of log in the worst scenario (with the 719 | # default Linux settings). 720 | # 721 | # If you have latency problems turn this to "yes". Otherwise leave it as 722 | # "no" that is the safest pick from the point of view of durability. 723 | 724 | no-appendfsync-on-rewrite no 725 | 726 | # Automatic rewrite of the append only file. 727 | # Redis is able to automatically rewrite the log file implicitly calling 728 | # BGREWRITEAOF when the AOF log size grows by the specified percentage. 729 | # 730 | # This is how it works: Redis remembers the size of the AOF file after the 731 | # latest rewrite (if no rewrite has happened since the restart, the size of 732 | # the AOF at startup is used). 733 | # 734 | # This base size is compared to the current size. If the current size is 735 | # bigger than the specified percentage, the rewrite is triggered. Also 736 | # you need to specify a minimal size for the AOF file to be rewritten, this 737 | # is useful to avoid rewriting the AOF file even if the percentage increase 738 | # is reached but it is still pretty small. 739 | # 740 | # Specify a percentage of zero in order to disable the automatic AOF 741 | # rewrite feature. 742 | 743 | auto-aof-rewrite-percentage 100 744 | auto-aof-rewrite-min-size 64mb 745 | 746 | # An AOF file may be found to be truncated at the end during the Redis 747 | # startup process, when the AOF data gets loaded back into memory. 748 | # This may happen when the system where Redis is running 749 | # crashes, especially when an ext4 filesystem is mounted without the 750 | # data=ordered option (however this can't happen when Redis itself 751 | # crashes or aborts but the operating system still works correctly). 752 | # 753 | # Redis can either exit with an error when this happens, or load as much 754 | # data as possible (the default now) and start if the AOF file is found 755 | # to be truncated at the end. The following option controls this behavior. 756 | # 757 | # If aof-load-truncated is set to yes, a truncated AOF file is loaded and 758 | # the Redis server starts emitting a log to inform the user of the event. 759 | # Otherwise if the option is set to no, the server aborts with an error 760 | # and refuses to start. When the option is set to no, the user requires 761 | # to fix the AOF file using the "redis-check-aof" utility before to restart 762 | # the server. 763 | # 764 | # Note that if the AOF file will be found to be corrupted in the middle 765 | # the server will still exit with an error. This option only applies when 766 | # Redis will try to read more data from the AOF file but not enough bytes 767 | # will be found. 768 | aof-load-truncated yes 769 | 770 | # When rewriting the AOF file, Redis is able to use an RDB preamble in the 771 | # AOF file for faster rewrites and recoveries. When this option is turned 772 | # on the rewritten AOF file is composed of two different stanzas: 773 | # 774 | # [RDB file][AOF tail] 775 | # 776 | # When loading Redis recognizes that the AOF file starts with the "REDIS" 777 | # string and loads the prefixed RDB file, and continues loading the AOF 778 | # tail. 779 | # 780 | # This is currently turned off by default in order to avoid the surprise 781 | # of a format change, but will at some point be used as the default. 782 | aof-use-rdb-preamble no 783 | 784 | ################################ LUA SCRIPTING ############################### 785 | 786 | # Max execution time of a Lua script in milliseconds. 787 | # 788 | # If the maximum execution time is reached Redis will log that a script is 789 | # still in execution after the maximum allowed time and will start to 790 | # reply to queries with an error. 791 | # 792 | # When a long running script exceeds the maximum execution time only the 793 | # SCRIPT KILL and SHUTDOWN NOSAVE commands are available. The first can be 794 | # used to stop a script that did not yet called write commands. The second 795 | # is the only way to shut down the server in the case a write command was 796 | # already issued by the script but the user doesn't want to wait for the natural 797 | # termination of the script. 798 | # 799 | # Set it to 0 or a negative value for unlimited execution without warnings. 800 | lua-time-limit 5000 801 | 802 | ################################ REDIS CLUSTER ############################### 803 | # 804 | # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 805 | # WARNING EXPERIMENTAL: Redis Cluster is considered to be stable code, however 806 | # in order to mark it as "mature" we need to wait for a non trivial percentage 807 | # of users to deploy it in production. 808 | # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 809 | # 810 | # Normal Redis instances can't be part of a Redis Cluster; only nodes that are 811 | # started as cluster nodes can. In order to start a Redis instance as a 812 | # cluster node enable the cluster support uncommenting the following: 813 | # 814 | # cluster-enabled yes 815 | 816 | # Every cluster node has a cluster configuration file. This file is not 817 | # intended to be edited by hand. It is created and updated by Redis nodes. 818 | # Every Redis Cluster node requires a different cluster configuration file. 819 | # Make sure that instances running in the same system do not have 820 | # overlapping cluster configuration file names. 821 | # 822 | # cluster-config-file nodes-6379.conf 823 | 824 | # Cluster node timeout is the amount of milliseconds a node must be unreachable 825 | # for it to be considered in failure state. 826 | # Most other internal time limits are multiple of the node timeout. 827 | # 828 | # cluster-node-timeout 15000 829 | 830 | # A slave of a failing master will avoid to start a failover if its data 831 | # looks too old. 832 | # 833 | # There is no simple way for a slave to actually have an exact measure of 834 | # its "data age", so the following two checks are performed: 835 | # 836 | # 1) If there are multiple slaves able to failover, they exchange messages 837 | # in order to try to give an advantage to the slave with the best 838 | # replication offset (more data from the master processed). 839 | # Slaves will try to get their rank by offset, and apply to the start 840 | # of the failover a delay proportional to their rank. 841 | # 842 | # 2) Every single slave computes the time of the last interaction with 843 | # its master. This can be the last ping or command received (if the master 844 | # is still in the "connected" state), or the time that elapsed since the 845 | # disconnection with the master (if the replication link is currently down). 846 | # If the last interaction is too old, the slave will not try to failover 847 | # at all. 848 | # 849 | # The point "2" can be tuned by user. Specifically a slave will not perform 850 | # the failover if, since the last interaction with the master, the time 851 | # elapsed is greater than: 852 | # 853 | # (node-timeout * slave-validity-factor) + repl-ping-slave-period 854 | # 855 | # So for example if node-timeout is 30 seconds, and the slave-validity-factor 856 | # is 10, and assuming a default repl-ping-slave-period of 10 seconds, the 857 | # slave will not try to failover if it was not able to talk with the master 858 | # for longer than 310 seconds. 859 | # 860 | # A large slave-validity-factor may allow slaves with too old data to failover 861 | # a master, while a too small value may prevent the cluster from being able to 862 | # elect a slave at all. 863 | # 864 | # For maximum availability, it is possible to set the slave-validity-factor 865 | # to a value of 0, which means, that slaves will always try to failover the 866 | # master regardless of the last time they interacted with the master. 867 | # (However they'll always try to apply a delay proportional to their 868 | # offset rank). 869 | # 870 | # Zero is the only value able to guarantee that when all the partitions heal 871 | # the cluster will always be able to continue. 872 | # 873 | # cluster-slave-validity-factor 10 874 | 875 | # Cluster slaves are able to migrate to orphaned masters, that are masters 876 | # that are left without working slaves. This improves the cluster ability 877 | # to resist to failures as otherwise an orphaned master can't be failed over 878 | # in case of failure if it has no working slaves. 879 | # 880 | # Slaves migrate to orphaned masters only if there are still at least a 881 | # given number of other working slaves for their old master. This number 882 | # is the "migration barrier". A migration barrier of 1 means that a slave 883 | # will migrate only if there is at least 1 other working slave for its master 884 | # and so forth. It usually reflects the number of slaves you want for every 885 | # master in your cluster. 886 | # 887 | # Default is 1 (slaves migrate only if their masters remain with at least 888 | # one slave). To disable migration just set it to a very large value. 889 | # A value of 0 can be set but is useful only for debugging and dangerous 890 | # in production. 891 | # 892 | # cluster-migration-barrier 1 893 | 894 | # By default Redis Cluster nodes stop accepting queries if they detect there 895 | # is at least an hash slot uncovered (no available node is serving it). 896 | # This way if the cluster is partially down (for example a range of hash slots 897 | # are no longer covered) all the cluster becomes, eventually, unavailable. 898 | # It automatically returns available as soon as all the slots are covered again. 899 | # 900 | # However sometimes you want the subset of the cluster which is working, 901 | # to continue to accept queries for the part of the key space that is still 902 | # covered. In order to do so, just set the cluster-require-full-coverage 903 | # option to no. 904 | # 905 | # cluster-require-full-coverage yes 906 | 907 | # In order to setup your cluster make sure to read the documentation 908 | # available at http://redis.io web site. 909 | 910 | ########################## CLUSTER DOCKER/NAT support ######################## 911 | 912 | # In certain deployments, Redis Cluster nodes address discovery fails, because 913 | # addresses are NAT-ted or because ports are forwarded (the typical case is 914 | # Docker and other containers). 915 | # 916 | # In order to make Redis Cluster working in such environments, a static 917 | # configuration where each node known its public address is needed. The 918 | # following two options are used for this scope, and are: 919 | # 920 | # * cluster-announce-ip 921 | # * cluster-announce-port 922 | # * cluster-announce-bus-port 923 | # 924 | # Each instruct the node about its address, client port, and cluster message 925 | # bus port. The information is then published in the header of the bus packets 926 | # so that other nodes will be able to correctly map the address of the node 927 | # publishing the information. 928 | # 929 | # If the above options are not used, the normal Redis Cluster auto-detection 930 | # will be used instead. 931 | # 932 | # Note that when remapped, the bus port may not be at the fixed offset of 933 | # clients port + 10000, so you can specify any port and bus-port depending 934 | # on how they get remapped. If the bus-port is not set, a fixed offset of 935 | # 10000 will be used as usually. 936 | # 937 | # Example: 938 | # 939 | # cluster-announce-ip 10.1.1.5 940 | # cluster-announce-port 6379 941 | # cluster-announce-bus-port 6380 942 | 943 | ################################## SLOW LOG ################################### 944 | 945 | # The Redis Slow Log is a system to log queries that exceeded a specified 946 | # execution time. The execution time does not include the I/O operations 947 | # like talking with the client, sending the reply and so forth, 948 | # but just the time needed to actually execute the command (this is the only 949 | # stage of command execution where the thread is blocked and can not serve 950 | # other requests in the meantime). 951 | # 952 | # You can configure the slow log with two parameters: one tells Redis 953 | # what is the execution time, in microseconds, to exceed in order for the 954 | # command to get logged, and the other parameter is the length of the 955 | # slow log. When a new command is logged the oldest one is removed from the 956 | # queue of logged commands. 957 | 958 | # The following time is expressed in microseconds, so 1000000 is equivalent 959 | # to one second. Note that a negative number disables the slow log, while 960 | # a value of zero forces the logging of every command. 961 | slowlog-log-slower-than 10000 962 | 963 | # There is no limit to this length. Just be aware that it will consume memory. 964 | # You can reclaim memory used by the slow log with SLOWLOG RESET. 965 | slowlog-max-len 128 966 | 967 | ################################ LATENCY MONITOR ############################## 968 | 969 | # The Redis latency monitoring subsystem samples different operations 970 | # at runtime in order to collect data related to possible sources of 971 | # latency of a Redis instance. 972 | # 973 | # Via the LATENCY command this information is available to the user that can 974 | # print graphs and obtain reports. 975 | # 976 | # The system only logs operations that were performed in a time equal or 977 | # greater than the amount of milliseconds specified via the 978 | # latency-monitor-threshold configuration directive. When its value is set 979 | # to zero, the latency monitor is turned off. 980 | # 981 | # By default latency monitoring is disabled since it is mostly not needed 982 | # if you don't have latency issues, and collecting data has a performance 983 | # impact, that while very small, can be measured under big load. Latency 984 | # monitoring can easily be enabled at runtime using the command 985 | # "CONFIG SET latency-monitor-threshold " if needed. 986 | latency-monitor-threshold 0 987 | 988 | ############################# EVENT NOTIFICATION ############################## 989 | 990 | # Redis can notify Pub/Sub clients about events happening in the key space. 991 | # This feature is documented at http://redis.io/topics/notifications 992 | # 993 | # For instance if keyspace events notification is enabled, and a client 994 | # performs a DEL operation on key "foo" stored in the Database 0, two 995 | # messages will be published via Pub/Sub: 996 | # 997 | # PUBLISH __keyspace@0__:foo del 998 | # PUBLISH __keyevent@0__:del foo 999 | # 1000 | # It is possible to select the events that Redis will notify among a set 1001 | # of classes. Every class is identified by a single character: 1002 | # 1003 | # K Keyspace events, published with __keyspace@__ prefix. 1004 | # E Keyevent events, published with __keyevent@__ prefix. 1005 | # g Generic commands (non-type specific) like DEL, EXPIRE, RENAME, ... 1006 | # $ String commands 1007 | # l List commands 1008 | # s Set commands 1009 | # h Hash commands 1010 | # z Sorted set commands 1011 | # x Expired events (events generated every time a key expires) 1012 | # e Evicted events (events generated when a key is evicted for maxmemory) 1013 | # A Alias for g$lshzxe, so that the "AKE" string means all the events. 1014 | # 1015 | # The "notify-keyspace-events" takes as argument a string that is composed 1016 | # of zero or multiple characters. The empty string means that notifications 1017 | # are disabled. 1018 | # 1019 | # Example: to enable list and generic events, from the point of view of the 1020 | # event name, use: 1021 | # 1022 | # notify-keyspace-events Elg 1023 | # 1024 | # Example 2: to get the stream of the expired keys subscribing to channel 1025 | # name __keyevent@0__:expired use: 1026 | # 1027 | # notify-keyspace-events Ex 1028 | # 1029 | # By default all notifications are disabled because most users don't need 1030 | # this feature and the feature has some overhead. Note that if you don't 1031 | # specify at least one of K or E, no events will be delivered. 1032 | notify-keyspace-events "" 1033 | 1034 | ############################### ADVANCED CONFIG ############################### 1035 | 1036 | # Hashes are encoded using a memory efficient data structure when they have a 1037 | # small number of entries, and the biggest entry does not exceed a given 1038 | # threshold. These thresholds can be configured using the following directives. 1039 | hash-max-ziplist-entries 512 1040 | hash-max-ziplist-value 64 1041 | 1042 | # Lists are also encoded in a special way to save a lot of space. 1043 | # The number of entries allowed per internal list node can be specified 1044 | # as a fixed maximum size or a maximum number of elements. 1045 | # For a fixed maximum size, use -5 through -1, meaning: 1046 | # -5: max size: 64 Kb <-- not recommended for normal workloads 1047 | # -4: max size: 32 Kb <-- not recommended 1048 | # -3: max size: 16 Kb <-- probably not recommended 1049 | # -2: max size: 8 Kb <-- good 1050 | # -1: max size: 4 Kb <-- good 1051 | # Positive numbers mean store up to _exactly_ that number of elements 1052 | # per list node. 1053 | # The highest performing option is usually -2 (8 Kb size) or -1 (4 Kb size), 1054 | # but if your use case is unique, adjust the settings as necessary. 1055 | list-max-ziplist-size -2 1056 | 1057 | # Lists may also be compressed. 1058 | # Compress depth is the number of quicklist ziplist nodes from *each* side of 1059 | # the list to *exclude* from compression. The head and tail of the list 1060 | # are always uncompressed for fast push/pop operations. Settings are: 1061 | # 0: disable all list compression 1062 | # 1: depth 1 means "don't start compressing until after 1 node into the list, 1063 | # going from either the head or tail" 1064 | # So: [head]->node->node->...->node->[tail] 1065 | # [head], [tail] will always be uncompressed; inner nodes will compress. 1066 | # 2: [head]->[next]->node->node->...->node->[prev]->[tail] 1067 | # 2 here means: don't compress head or head->next or tail->prev or tail, 1068 | # but compress all nodes between them. 1069 | # 3: [head]->[next]->[next]->node->node->...->node->[prev]->[prev]->[tail] 1070 | # etc. 1071 | list-compress-depth 0 1072 | 1073 | # Sets have a special encoding in just one case: when a set is composed 1074 | # of just strings that happen to be integers in radix 10 in the range 1075 | # of 64 bit signed integers. 1076 | # The following configuration setting sets the limit in the size of the 1077 | # set in order to use this special memory saving encoding. 1078 | set-max-intset-entries 512 1079 | 1080 | # Similarly to hashes and lists, sorted sets are also specially encoded in 1081 | # order to save a lot of space. This encoding is only used when the length and 1082 | # elements of a sorted set are below the following limits: 1083 | zset-max-ziplist-entries 128 1084 | zset-max-ziplist-value 64 1085 | 1086 | # HyperLogLog sparse representation bytes limit. The limit includes the 1087 | # 16 bytes header. When an HyperLogLog using the sparse representation crosses 1088 | # this limit, it is converted into the dense representation. 1089 | # 1090 | # A value greater than 16000 is totally useless, since at that point the 1091 | # dense representation is more memory efficient. 1092 | # 1093 | # The suggested value is ~ 3000 in order to have the benefits of 1094 | # the space efficient encoding without slowing down too much PFADD, 1095 | # which is O(N) with the sparse encoding. The value can be raised to 1096 | # ~ 10000 when CPU is not a concern, but space is, and the data set is 1097 | # composed of many HyperLogLogs with cardinality in the 0 - 15000 range. 1098 | hll-sparse-max-bytes 3000 1099 | 1100 | # Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in 1101 | # order to help rehashing the main Redis hash table (the one mapping top-level 1102 | # keys to values). The hash table implementation Redis uses (see dict.c) 1103 | # performs a lazy rehashing: the more operation you run into a hash table 1104 | # that is rehashing, the more rehashing "steps" are performed, so if the 1105 | # server is idle the rehashing is never complete and some more memory is used 1106 | # by the hash table. 1107 | # 1108 | # The default is to use this millisecond 10 times every second in order to 1109 | # actively rehash the main dictionaries, freeing memory when possible. 1110 | # 1111 | # If unsure: 1112 | # use "activerehashing no" if you have hard latency requirements and it is 1113 | # not a good thing in your environment that Redis can reply from time to time 1114 | # to queries with 2 milliseconds delay. 1115 | # 1116 | # use "activerehashing yes" if you don't have such hard requirements but 1117 | # want to free memory asap when possible. 1118 | activerehashing yes 1119 | 1120 | # The client output buffer limits can be used to force disconnection of clients 1121 | # that are not reading data from the server fast enough for some reason (a 1122 | # common reason is that a Pub/Sub client can't consume messages as fast as the 1123 | # publisher can produce them). 1124 | # 1125 | # The limit can be set differently for the three different classes of clients: 1126 | # 1127 | # normal -> normal clients including MONITOR clients 1128 | # slave -> slave clients 1129 | # pubsub -> clients subscribed to at least one pubsub channel or pattern 1130 | # 1131 | # The syntax of every client-output-buffer-limit directive is the following: 1132 | # 1133 | # client-output-buffer-limit 1134 | # 1135 | # A client is immediately disconnected once the hard limit is reached, or if 1136 | # the soft limit is reached and remains reached for the specified number of 1137 | # seconds (continuously). 1138 | # So for instance if the hard limit is 32 megabytes and the soft limit is 1139 | # 16 megabytes / 10 seconds, the client will get disconnected immediately 1140 | # if the size of the output buffers reach 32 megabytes, but will also get 1141 | # disconnected if the client reaches 16 megabytes and continuously overcomes 1142 | # the limit for 10 seconds. 1143 | # 1144 | # By default normal clients are not limited because they don't receive data 1145 | # without asking (in a push way), but just after a request, so only 1146 | # asynchronous clients may create a scenario where data is requested faster 1147 | # than it can read. 1148 | # 1149 | # Instead there is a default limit for pubsub and slave clients, since 1150 | # subscribers and slaves receive data in a push fashion. 1151 | # 1152 | # Both the hard or the soft limit can be disabled by setting them to zero. 1153 | client-output-buffer-limit normal 0 0 0 1154 | client-output-buffer-limit slave 256mb 64mb 60 1155 | client-output-buffer-limit pubsub 32mb 8mb 60 1156 | 1157 | # Redis calls an internal function to perform many background tasks, like 1158 | # closing connections of clients in timeout, purging expired keys that are 1159 | # never requested, and so forth. 1160 | # 1161 | # Not all tasks are performed with the same frequency, but Redis checks for 1162 | # tasks to perform according to the specified "hz" value. 1163 | # 1164 | # By default "hz" is set to 10. Raising the value will use more CPU when 1165 | # Redis is idle, but at the same time will make Redis more responsive when 1166 | # there are many keys expiring at the same time, and timeouts may be 1167 | # handled with more precision. 1168 | # 1169 | # The range is between 1 and 500, however a value over 100 is usually not 1170 | # a good idea. Most users should use the default of 10 and raise this up to 1171 | # 100 only in environments where very low latency is required. 1172 | hz 10 1173 | 1174 | # When a child rewrites the AOF file, if the following option is enabled 1175 | # the file will be fsync-ed every 32 MB of data generated. This is useful 1176 | # in order to commit the file to the disk more incrementally and avoid 1177 | # big latency spikes. 1178 | aof-rewrite-incremental-fsync yes 1179 | 1180 | # Redis LFU eviction (see maxmemory setting) can be tuned. However it is a good 1181 | # idea to start with the default settings and only change them after investigating 1182 | # how to improve the performances and how the keys LFU change over time, which 1183 | # is possible to inspect via the OBJECT FREQ command. 1184 | # 1185 | # There are two tunable parameters in the Redis LFU implementation: the 1186 | # counter logarithm factor and the counter decay time. It is important to 1187 | # understand what the two parameters mean before changing them. 1188 | # 1189 | # The LFU counter is just 8 bits per key, it's maximum value is 255, so Redis 1190 | # uses a probabilistic increment with logarithmic behavior. Given the value 1191 | # of the old counter, when a key is accessed, the counter is incremented in 1192 | # this way: 1193 | # 1194 | # 1. A random number R between 0 and 1 is extracted. 1195 | # 2. A probability P is calculated as 1/(old_value*lfu_log_factor+1). 1196 | # 3. The counter is incremented only if R < P. 1197 | # 1198 | # The default lfu-log-factor is 10. This is a table of how the frequency 1199 | # counter changes with a different number of accesses with different 1200 | # logarithmic factors: 1201 | # 1202 | # +--------+------------+------------+------------+------------+------------+ 1203 | # | factor | 100 hits | 1000 hits | 100K hits | 1M hits | 10M hits | 1204 | # +--------+------------+------------+------------+------------+------------+ 1205 | # | 0 | 104 | 255 | 255 | 255 | 255 | 1206 | # +--------+------------+------------+------------+------------+------------+ 1207 | # | 1 | 18 | 49 | 255 | 255 | 255 | 1208 | # +--------+------------+------------+------------+------------+------------+ 1209 | # | 10 | 10 | 18 | 142 | 255 | 255 | 1210 | # +--------+------------+------------+------------+------------+------------+ 1211 | # | 100 | 8 | 11 | 49 | 143 | 255 | 1212 | # +--------+------------+------------+------------+------------+------------+ 1213 | # 1214 | # NOTE: The above table was obtained by running the following commands: 1215 | # 1216 | # redis-benchmark -n 1000000 incr foo 1217 | # redis-cli object freq foo 1218 | # 1219 | # NOTE 2: The counter initial value is 5 in order to give new objects a chance 1220 | # to accumulate hits. 1221 | # 1222 | # The counter decay time is the time, in minutes, that must elapse in order 1223 | # for the key counter to be divided by two (or decremented if it has a value 1224 | # less <= 10). 1225 | # 1226 | # The default value for the lfu-decay-time is 1. A Special value of 0 means to 1227 | # decay the counter every time it happens to be scanned. 1228 | # 1229 | # lfu-log-factor 10 1230 | # lfu-decay-time 1 1231 | 1232 | ########################### ACTIVE DEFRAGMENTATION ####################### 1233 | # 1234 | # WARNING THIS FEATURE IS EXPERIMENTAL. However it was stress tested 1235 | # even in production and manually tested by multiple engineers for some 1236 | # time. 1237 | # 1238 | # What is active defragmentation? 1239 | # ------------------------------- 1240 | # 1241 | # Active (online) defragmentation allows a Redis server to compact the 1242 | # spaces left between small allocations and deallocations of data in memory, 1243 | # thus allowing to reclaim back memory. 1244 | # 1245 | # Fragmentation is a natural process that happens with every allocator (but 1246 | # less so with Jemalloc, fortunately) and certain workloads. Normally a server 1247 | # restart is needed in order to lower the fragmentation, or at least to flush 1248 | # away all the data and create it again. However thanks to this feature 1249 | # implemented by Oran Agra for Redis 4.0 this process can happen at runtime 1250 | # in an "hot" way, while the server is running. 1251 | # 1252 | # Basically when the fragmentation is over a certain level (see the 1253 | # configuration options below) Redis will start to create new copies of the 1254 | # values in contiguous memory regions by exploiting certain specific Jemalloc 1255 | # features (in order to understand if an allocation is causing fragmentation 1256 | # and to allocate it in a better place), and at the same time, will release the 1257 | # old copies of the data. This process, repeated incrementally for all the keys 1258 | # will cause the fragmentation to drop back to normal values. 1259 | # 1260 | # Important things to understand: 1261 | # 1262 | # 1. This feature is disabled by default, and only works if you compiled Redis 1263 | # to use the copy of Jemalloc we ship with the source code of Redis. 1264 | # This is the default with Linux builds. 1265 | # 1266 | # 2. You never need to enable this feature if you don't have fragmentation 1267 | # issues. 1268 | # 1269 | # 3. Once you experience fragmentation, you can enable this feature when 1270 | # needed with the command "CONFIG SET activedefrag yes". 1271 | # 1272 | # The configuration parameters are able to fine tune the behavior of the 1273 | # defragmentation process. If you are not sure about what they mean it is 1274 | # a good idea to leave the defaults untouched. 1275 | 1276 | # Enabled active defragmentation 1277 | # activedefrag yes 1278 | 1279 | # Minimum amount of fragmentation waste to start active defrag 1280 | # active-defrag-ignore-bytes 100mb 1281 | 1282 | # Minimum percentage of fragmentation to start active defrag 1283 | # active-defrag-threshold-lower 10 1284 | 1285 | # Maximum percentage of fragmentation at which we use maximum effort 1286 | # active-defrag-threshold-upper 100 1287 | 1288 | # Minimal effort for defrag in CPU percentage 1289 | # active-defrag-cycle-min 25 1290 | 1291 | # Maximal effort for defrag in CPU percentage 1292 | # active-defrag-cycle-max 75 1293 | -------------------------------------------------------------------------------- /php/php.ini: -------------------------------------------------------------------------------- 1 | [PHP] 2 | 3 | ;;;;;;;;;;;;;;;;;;; 4 | ; About php.ini ; 5 | ;;;;;;;;;;;;;;;;;;; 6 | ; PHP's initialization file, generally called php.ini, is responsible for 7 | ; configuring many of the aspects of PHP's behavior. 8 | 9 | ; PHP attempts to find and load this configuration from a number of locations. 10 | ; The following is a summary of its search order: 11 | ; 1. SAPI module specific location. 12 | ; 2. The PHPRC environment variable. (As of PHP 5.2.0) 13 | ; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0) 14 | ; 4. Current working directory (except CLI) 15 | ; 5. The web server's directory (for SAPI modules), or directory of PHP 16 | ; (otherwise in Windows) 17 | ; 6. The directory from the --with-config-file-path compile time option, or the 18 | ; Windows directory (usually C:\windows) 19 | ; See the PHP docs for more specific information. 20 | ; http://php.net/configuration.file 21 | 22 | ; The syntax of the file is extremely simple. Whitespace and lines 23 | ; beginning with a semicolon are silently ignored (as you probably guessed). 24 | ; Section headers (e.g. [Foo]) are also silently ignored, even though 25 | ; they might mean something in the future. 26 | 27 | ; Directives following the section heading [PATH=/www/mysite] only 28 | ; apply to PHP files in the /www/mysite directory. Directives 29 | ; following the section heading [HOST=www.example.com] only apply to 30 | ; PHP files served from www.example.com. Directives set in these 31 | ; special sections cannot be overridden by user-defined INI files or 32 | ; at runtime. Currently, [PATH=] and [HOST=] sections only work under 33 | ; CGI/FastCGI. 34 | ; http://php.net/ini.sections 35 | 36 | ; Directives are specified using the following syntax: 37 | ; directive = value 38 | ; Directive names are *case sensitive* - foo=bar is different from FOO=bar. 39 | ; Directives are variables used to configure PHP or PHP extensions. 40 | ; There is no name validation. If PHP can't find an expected 41 | ; directive because it is not set or is mistyped, a default value will be used. 42 | 43 | ; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one 44 | ; of the INI constants (On, Off, True, False, Yes, No and None) or an expression 45 | ; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a 46 | ; previously set variable or directive (e.g. ${foo}) 47 | 48 | ; Expressions in the INI file are limited to bitwise operators and parentheses: 49 | ; | bitwise OR 50 | ; ^ bitwise XOR 51 | ; & bitwise AND 52 | ; ~ bitwise NOT 53 | ; ! boolean NOT 54 | 55 | ; Boolean flags can be turned on using the values 1, On, True or Yes. 56 | ; They can be turned off using the values 0, Off, False or No. 57 | 58 | ; An empty string can be denoted by simply not writing anything after the equal 59 | ; sign, or by using the None keyword: 60 | 61 | ; foo = ; sets foo to an empty string 62 | ; foo = None ; sets foo to an empty string 63 | ; foo = "None" ; sets foo to the string 'None' 64 | 65 | ; If you use constants in your value, and these constants belong to a 66 | ; dynamically loaded extension (either a PHP extension or a Zend extension), 67 | ; you may only use these constants *after* the line that loads the extension. 68 | 69 | ;;;;;;;;;;;;;;;;;;; 70 | ; About this file ; 71 | ;;;;;;;;;;;;;;;;;;; 72 | ; PHP comes packaged with two INI files. One that is recommended to be used 73 | ; in production environments and one that is recommended to be used in 74 | ; development environments. 75 | 76 | ; php.ini-production contains settings which hold security, performance and 77 | ; best practices at its core. But please be aware, these settings may break 78 | ; compatibility with older or less security conscience applications. We 79 | ; recommending using the production ini in production and testing environments. 80 | 81 | ; php.ini-development is very similar to its production variant, except it is 82 | ; much more verbose when it comes to errors. We recommend using the 83 | ; development version only in development environments, as errors shown to 84 | ; application users can inadvertently leak otherwise secure information. 85 | 86 | ; This is the php.ini-development INI file. 87 | 88 | ;;;;;;;;;;;;;;;;;;; 89 | ; Quick Reference ; 90 | ;;;;;;;;;;;;;;;;;;; 91 | ; The following are all the settings which are different in either the production 92 | ; or development versions of the INIs with respect to PHP's default behavior. 93 | ; Please see the actual settings later in the document for more details as to why 94 | ; we recommend these changes in PHP's behavior. 95 | 96 | ; display_errors 97 | ; Default Value: On 98 | ; Development Value: On 99 | ; Production Value: Off 100 | 101 | ; display_startup_errors 102 | ; Default Value: Off 103 | ; Development Value: On 104 | ; Production Value: Off 105 | 106 | ; error_reporting 107 | ; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED 108 | ; Development Value: E_ALL 109 | ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT 110 | 111 | ; html_errors 112 | ; Default Value: On 113 | ; Development Value: On 114 | ; Production value: On 115 | 116 | ; log_errors 117 | ; Default Value: Off 118 | ; Development Value: On 119 | ; Production Value: On 120 | 121 | ; max_input_time 122 | ; Default Value: -1 (Unlimited) 123 | ; Development Value: 60 (60 seconds) 124 | ; Production Value: 60 (60 seconds) 125 | 126 | ; output_buffering 127 | ; Default Value: Off 128 | ; Development Value: 4096 129 | ; Production Value: 4096 130 | 131 | ; register_argc_argv 132 | ; Default Value: On 133 | ; Development Value: Off 134 | ; Production Value: Off 135 | 136 | ; request_order 137 | ; Default Value: None 138 | ; Development Value: "GP" 139 | ; Production Value: "GP" 140 | 141 | ; session.gc_divisor 142 | ; Default Value: 100 143 | ; Development Value: 1000 144 | ; Production Value: 1000 145 | 146 | ; session.sid_bits_per_character 147 | ; Default Value: 4 148 | ; Development Value: 5 149 | ; Production Value: 5 150 | 151 | ; short_open_tag 152 | ; Default Value: On 153 | ; Development Value: Off 154 | ; Production Value: Off 155 | 156 | ; variables_order 157 | ; Default Value: "EGPCS" 158 | ; Development Value: "GPCS" 159 | ; Production Value: "GPCS" 160 | 161 | ;;;;;;;;;;;;;;;;;;;; 162 | ; php.ini Options ; 163 | ;;;;;;;;;;;;;;;;;;;; 164 | ; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini" 165 | ;user_ini.filename = ".user.ini" 166 | 167 | ; To disable this feature set this option to an empty value 168 | ;user_ini.filename = 169 | 170 | ; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes) 171 | ;user_ini.cache_ttl = 300 172 | 173 | ;;;;;;;;;;;;;;;;;;;; 174 | ; Language Options ; 175 | ;;;;;;;;;;;;;;;;;;;; 176 | 177 | ; Enable the PHP scripting language engine under Apache. 178 | ; http://php.net/engine 179 | engine = On 180 | 181 | ; This directive determines whether or not PHP will recognize code between 182 | ; tags as PHP source which should be processed as such. It is 183 | ; generally recommended that should be used and that this feature 184 | ; should be disabled, as enabling it may result in issues when generating XML 185 | ; documents, however this remains supported for backward compatibility reasons. 186 | ; Note that this directive does not control the would work. 318 | ; http://php.net/syntax-highlighting 319 | ;highlight.string = #DD0000 320 | ;highlight.comment = #FF9900 321 | ;highlight.keyword = #007700 322 | ;highlight.default = #0000BB 323 | ;highlight.html = #000000 324 | 325 | ; If enabled, the request will be allowed to complete even if the user aborts 326 | ; the request. Consider enabling it if executing long requests, which may end up 327 | ; being interrupted by the user or a browser timing out. PHP's default behavior 328 | ; is to disable this feature. 329 | ; http://php.net/ignore-user-abort 330 | ;ignore_user_abort = On 331 | 332 | ; Determines the size of the realpath cache to be used by PHP. This value should 333 | ; be increased on systems where PHP opens many files to reflect the quantity of 334 | ; the file operations performed. 335 | ; http://php.net/realpath-cache-size 336 | ;realpath_cache_size = 4096k 337 | 338 | ; Duration of time, in seconds for which to cache realpath information for a given 339 | ; file or directory. For systems with rarely changing files, consider increasing this 340 | ; value. 341 | ; http://php.net/realpath-cache-ttl 342 | ;realpath_cache_ttl = 120 343 | 344 | ; Enables or disables the circular reference collector. 345 | ; http://php.net/zend.enable-gc 346 | zend.enable_gc = On 347 | 348 | ; If enabled, scripts may be written in encodings that are incompatible with 349 | ; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such 350 | ; encodings. To use this feature, mbstring extension must be enabled. 351 | ; Default: Off 352 | ;zend.multibyte = Off 353 | 354 | ; Allows to set the default encoding for the scripts. This value will be used 355 | ; unless "declare(encoding=...)" directive appears at the top of the script. 356 | ; Only affects if zend.multibyte is set. 357 | ; Default: "" 358 | ;zend.script_encoding = 359 | 360 | ;;;;;;;;;;;;;;;;; 361 | ; Miscellaneous ; 362 | ;;;;;;;;;;;;;;;;; 363 | 364 | ; Decides whether PHP may expose the fact that it is installed on the server 365 | ; (e.g. by adding its signature to the Web server header). It is no security 366 | ; threat in any way, but it makes it possible to determine whether you use PHP 367 | ; on your server or not. 368 | ; http://php.net/expose-php 369 | expose_php = On 370 | 371 | ;;;;;;;;;;;;;;;;;;; 372 | ; Resource Limits ; 373 | ;;;;;;;;;;;;;;;;;;; 374 | 375 | ; Maximum execution time of each script, in seconds 376 | ; http://php.net/max-execution-time 377 | ; Note: This directive is hardcoded to 0 for the CLI SAPI 378 | max_execution_time = 60 379 | 380 | ; Maximum amount of time each script may spend parsing request data. It's a good 381 | ; idea to limit this time on productions servers in order to eliminate unexpectedly 382 | ; long running scripts. 383 | ; Note: This directive is hardcoded to -1 for the CLI SAPI 384 | ; Default Value: -1 (Unlimited) 385 | ; Development Value: 60 (60 seconds) 386 | ; Production Value: 60 (60 seconds) 387 | ; http://php.net/max-input-time 388 | max_input_time = 60 389 | 390 | ; Maximum input variable nesting level 391 | ; http://php.net/max-input-nesting-level 392 | ;max_input_nesting_level = 64 393 | 394 | ; How many GET/POST/COOKIE input variables may be accepted 395 | ;max_input_vars = 1000 396 | 397 | ; Maximum amount of memory a script may consume (128MB) 398 | ; http://php.net/memory-limit 399 | memory_limit = 256M 400 | 401 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 402 | ; Error handling and logging ; 403 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 404 | 405 | ; This directive informs PHP of which errors, warnings and notices you would like 406 | ; it to take action for. The recommended way of setting values for this 407 | ; directive is through the use of the error level constants and bitwise 408 | ; operators. The error level constants are below here for convenience as well as 409 | ; some common settings and their meanings. 410 | ; By default, PHP is set to take action on all errors, notices and warnings EXCEPT 411 | ; those related to E_NOTICE and E_STRICT, which together cover best practices and 412 | ; recommended coding standards in PHP. For performance reasons, this is the 413 | ; recommend error reporting setting. Your production server shouldn't be wasting 414 | ; resources complaining about best practices and coding standards. That's what 415 | ; development servers and development settings are for. 416 | ; Note: The php.ini-development file has this setting as E_ALL. This 417 | ; means it pretty much reports everything which is exactly what you want during 418 | ; development and early testing. 419 | ; 420 | ; Error Level Constants: 421 | ; E_ALL - All errors and warnings (includes E_STRICT as of PHP 5.4.0) 422 | ; E_ERROR - fatal run-time errors 423 | ; E_RECOVERABLE_ERROR - almost fatal run-time errors 424 | ; E_WARNING - run-time warnings (non-fatal errors) 425 | ; E_PARSE - compile-time parse errors 426 | ; E_NOTICE - run-time notices (these are warnings which often result 427 | ; from a bug in your code, but it's possible that it was 428 | ; intentional (e.g., using an uninitialized variable and 429 | ; relying on the fact it is automatically initialized to an 430 | ; empty string) 431 | ; E_STRICT - run-time notices, enable to have PHP suggest changes 432 | ; to your code which will ensure the best interoperability 433 | ; and forward compatibility of your code 434 | ; E_CORE_ERROR - fatal errors that occur during PHP's initial startup 435 | ; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's 436 | ; initial startup 437 | ; E_COMPILE_ERROR - fatal compile-time errors 438 | ; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) 439 | ; E_USER_ERROR - user-generated error message 440 | ; E_USER_WARNING - user-generated warning message 441 | ; E_USER_NOTICE - user-generated notice message 442 | ; E_DEPRECATED - warn about code that will not work in future versions 443 | ; of PHP 444 | ; E_USER_DEPRECATED - user-generated deprecation warnings 445 | ; 446 | ; Common Values: 447 | ; E_ALL (Show all errors, warnings and notices including coding standards.) 448 | ; E_ALL & ~E_NOTICE (Show all errors, except for notices) 449 | ; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.) 450 | ; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) 451 | ; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED 452 | ; Development Value: E_ALL 453 | ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT 454 | ; http://php.net/error-reporting 455 | error_reporting = E_ALL 456 | 457 | ; This directive controls whether or not and where PHP will output errors, 458 | ; notices and warnings too. Error output is very useful during development, but 459 | ; it could be very dangerous in production environments. Depending on the code 460 | ; which is triggering the error, sensitive information could potentially leak 461 | ; out of your application such as database usernames and passwords or worse. 462 | ; For production environments, we recommend logging errors rather than 463 | ; sending them to STDOUT. 464 | ; Possible Values: 465 | ; Off = Do not display any errors 466 | ; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) 467 | ; On or stdout = Display errors to STDOUT 468 | ; Default Value: On 469 | ; Development Value: On 470 | ; Production Value: Off 471 | ; http://php.net/display-errors 472 | display_errors = On 473 | 474 | ; The display of errors which occur during PHP's startup sequence are handled 475 | ; separately from display_errors. PHP's default behavior is to suppress those 476 | ; errors from clients. Turning the display of startup errors on can be useful in 477 | ; debugging configuration problems. We strongly recommend you 478 | ; set this to 'off' for production servers. 479 | ; Default Value: Off 480 | ; Development Value: On 481 | ; Production Value: Off 482 | ; http://php.net/display-startup-errors 483 | display_startup_errors = On 484 | 485 | ; Besides displaying errors, PHP can also log errors to locations such as a 486 | ; server-specific log, STDERR, or a location specified by the error_log 487 | ; directive found below. While errors should not be displayed on productions 488 | ; servers they should still be monitored and logging is a great way to do that. 489 | ; Default Value: Off 490 | ; Development Value: On 491 | ; Production Value: On 492 | ; http://php.net/log-errors 493 | log_errors = On 494 | 495 | ; Set maximum length of log_errors. In error_log information about the source is 496 | ; added. The default is 1024 and 0 allows to not apply any maximum length at all. 497 | ; http://php.net/log-errors-max-len 498 | log_errors_max_len = 1024 499 | 500 | ; Do not log repeated messages. Repeated errors must occur in same file on same 501 | ; line unless ignore_repeated_source is set true. 502 | ; http://php.net/ignore-repeated-errors 503 | ignore_repeated_errors = Off 504 | 505 | ; Ignore source of message when ignoring repeated messages. When this setting 506 | ; is On you will not log errors with repeated messages from different files or 507 | ; source lines. 508 | ; http://php.net/ignore-repeated-source 509 | ignore_repeated_source = Off 510 | 511 | ; If this parameter is set to Off, then memory leaks will not be shown (on 512 | ; stdout or in the log). This is only effective in a debug compile, and if 513 | ; error reporting includes E_WARNING in the allowed list 514 | ; http://php.net/report-memleaks 515 | report_memleaks = On 516 | 517 | ; This setting is on by default. 518 | ;report_zend_debug = 0 519 | 520 | ; Store the last error/warning message in $php_errormsg (boolean). 521 | ; This directive is DEPRECATED. 522 | ; Default Value: Off 523 | ; Development Value: Off 524 | ; Production Value: Off 525 | ; http://php.net/track-errors 526 | ;track_errors = Off 527 | 528 | ; Turn off normal error reporting and emit XML-RPC error XML 529 | ; http://php.net/xmlrpc-errors 530 | ;xmlrpc_errors = 0 531 | 532 | ; An XML-RPC faultCode 533 | ;xmlrpc_error_number = 0 534 | 535 | ; When PHP displays or logs an error, it has the capability of formatting the 536 | ; error message as HTML for easier reading. This directive controls whether 537 | ; the error message is formatted as HTML or not. 538 | ; Note: This directive is hardcoded to Off for the CLI SAPI 539 | ; Default Value: On 540 | ; Development Value: On 541 | ; Production value: On 542 | ; http://php.net/html-errors 543 | html_errors = On 544 | 545 | ; If html_errors is set to On *and* docref_root is not empty, then PHP 546 | ; produces clickable error messages that direct to a page describing the error 547 | ; or function causing the error in detail. 548 | ; You can download a copy of the PHP manual from http://php.net/docs 549 | ; and change docref_root to the base URL of your local copy including the 550 | ; leading '/'. You must also specify the file extension being used including 551 | ; the dot. PHP's default behavior is to leave these settings empty, in which 552 | ; case no links to documentation are generated. 553 | ; Note: Never use this feature for production boxes. 554 | ; http://php.net/docref-root 555 | ; Examples 556 | ;docref_root = "/phpmanual/" 557 | 558 | ; http://php.net/docref-ext 559 | ;docref_ext = .html 560 | 561 | ; String to output before an error message. PHP's default behavior is to leave 562 | ; this setting blank. 563 | ; http://php.net/error-prepend-string 564 | ; Example: 565 | ;error_prepend_string = "" 566 | 567 | ; String to output after an error message. PHP's default behavior is to leave 568 | ; this setting blank. 569 | ; http://php.net/error-append-string 570 | ; Example: 571 | ;error_append_string = "" 572 | 573 | ; Log errors to specified file. PHP's default behavior is to leave this value 574 | ; empty. 575 | ; http://php.net/error-log 576 | ; Example: 577 | ;error_log = php_errors.log 578 | ; Log errors to syslog (Event Log on Windows). 579 | ;error_log = syslog 580 | 581 | ; The syslog ident is a string which is prepended to every message logged 582 | ; to syslog. Only used when error_log is set to syslog. 583 | ;syslog.ident = php 584 | 585 | ; The syslog facility is used to specify what type of program is logging 586 | ; the message. Only used when error_log is set to syslog. 587 | ;syslog.facility = user 588 | 589 | ; Set this to disable filtering control characters (the default). 590 | ; Some loggers only accept NVT-ASCII, others accept anything that's not 591 | ; control characters. If your logger accepts everything, then no filtering 592 | ; is needed at all. 593 | ; Allowed values are: 594 | ; ascii (only base ASCII characters) 595 | ; no_ctrl (all characters except control characters) 596 | ; all (all characters) 597 | ;syslog.filter = ascii 598 | 599 | ;windows.show_crt_warning 600 | ; Default value: 0 601 | ; Development value: 0 602 | ; Production value: 0 603 | 604 | ;;;;;;;;;;;;;;;;; 605 | ; Data Handling ; 606 | ;;;;;;;;;;;;;;;;; 607 | 608 | ; The separator used in PHP generated URLs to separate arguments. 609 | ; PHP's default setting is "&". 610 | ; http://php.net/arg-separator.output 611 | ; Example: 612 | ;arg_separator.output = "&" 613 | 614 | ; List of separator(s) used by PHP to parse input URLs into variables. 615 | ; PHP's default setting is "&". 616 | ; NOTE: Every character in this directive is considered as separator! 617 | ; http://php.net/arg-separator.input 618 | ; Example: 619 | ;arg_separator.input = ";&" 620 | 621 | ; This directive determines which super global arrays are registered when PHP 622 | ; starts up. G,P,C,E & S are abbreviations for the following respective super 623 | ; globals: GET, POST, COOKIE, ENV and SERVER. There is a performance penalty 624 | ; paid for the registration of these arrays and because ENV is not as commonly 625 | ; used as the others, ENV is not recommended on productions servers. You 626 | ; can still get access to the environment variables through getenv() should you 627 | ; need to. 628 | ; Default Value: "EGPCS" 629 | ; Development Value: "GPCS" 630 | ; Production Value: "GPCS"; 631 | ; http://php.net/variables-order 632 | variables_order = "GPCS" 633 | 634 | ; This directive determines which super global data (G,P & C) should be 635 | ; registered into the super global array REQUEST. If so, it also determines 636 | ; the order in which that data is registered. The values for this directive 637 | ; are specified in the same manner as the variables_order directive, 638 | ; EXCEPT one. Leaving this value empty will cause PHP to use the value set 639 | ; in the variables_order directive. It does not mean it will leave the super 640 | ; globals array REQUEST empty. 641 | ; Default Value: None 642 | ; Development Value: "GP" 643 | ; Production Value: "GP" 644 | ; http://php.net/request-order 645 | request_order = "GP" 646 | 647 | ; This directive determines whether PHP registers $argv & $argc each time it 648 | ; runs. $argv contains an array of all the arguments passed to PHP when a script 649 | ; is invoked. $argc contains an integer representing the number of arguments 650 | ; that were passed when the script was invoked. These arrays are extremely 651 | ; useful when running scripts from the command line. When this directive is 652 | ; enabled, registering these variables consumes CPU cycles and memory each time 653 | ; a script is executed. For performance reasons, this feature should be disabled 654 | ; on production servers. 655 | ; Note: This directive is hardcoded to On for the CLI SAPI 656 | ; Default Value: On 657 | ; Development Value: Off 658 | ; Production Value: Off 659 | ; http://php.net/register-argc-argv 660 | register_argc_argv = Off 661 | 662 | ; When enabled, the ENV, REQUEST and SERVER variables are created when they're 663 | ; first used (Just In Time) instead of when the script starts. If these 664 | ; variables are not used within a script, having this directive on will result 665 | ; in a performance gain. The PHP directive register_argc_argv must be disabled 666 | ; for this directive to have any effect. 667 | ; http://php.net/auto-globals-jit 668 | auto_globals_jit = On 669 | 670 | ; Whether PHP will read the POST data. 671 | ; This option is enabled by default. 672 | ; Most likely, you won't want to disable this option globally. It causes $_POST 673 | ; and $_FILES to always be empty; the only way you will be able to read the 674 | ; POST data will be through the php://input stream wrapper. This can be useful 675 | ; to proxy requests or to process the POST data in a memory efficient fashion. 676 | ; http://php.net/enable-post-data-reading 677 | ;enable_post_data_reading = Off 678 | 679 | ; Maximum size of POST data that PHP will accept. 680 | ; Its value may be 0 to disable the limit. It is ignored if POST data reading 681 | ; is disabled through enable_post_data_reading. 682 | ; http://php.net/post-max-size 683 | post_max_size = 20M 684 | 685 | ; Automatically add files before PHP document. 686 | ; http://php.net/auto-prepend-file 687 | auto_prepend_file = 688 | 689 | ; Automatically add files after PHP document. 690 | ; http://php.net/auto-append-file 691 | auto_append_file = 692 | 693 | ; By default, PHP will output a media type using the Content-Type header. To 694 | ; disable this, simply set it to be empty. 695 | ; 696 | ; PHP's built-in default media type is set to text/html. 697 | ; http://php.net/default-mimetype 698 | default_mimetype = "text/html" 699 | 700 | ; PHP's default character set is set to UTF-8. 701 | ; http://php.net/default-charset 702 | default_charset = "UTF-8" 703 | 704 | ; PHP internal character encoding is set to empty. 705 | ; If empty, default_charset is used. 706 | ; http://php.net/internal-encoding 707 | ;internal_encoding = 708 | 709 | ; PHP input character encoding is set to empty. 710 | ; If empty, default_charset is used. 711 | ; http://php.net/input-encoding 712 | ;input_encoding = 713 | 714 | ; PHP output character encoding is set to empty. 715 | ; If empty, default_charset is used. 716 | ; See also output_buffer. 717 | ; http://php.net/output-encoding 718 | ;output_encoding = 719 | 720 | ;;;;;;;;;;;;;;;;;;;;;;;;; 721 | ; Paths and Directories ; 722 | ;;;;;;;;;;;;;;;;;;;;;;;;; 723 | 724 | ; UNIX: "/path1:/path2" 725 | ;include_path = ".:/php/includes" 726 | ; 727 | ; Windows: "\path1;\path2" 728 | ;include_path = ".;c:\php\includes" 729 | ; 730 | ; PHP's default setting for include_path is ".;/path/to/php/pear" 731 | ; http://php.net/include-path 732 | 733 | ; The root of the PHP pages, used only if nonempty. 734 | ; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root 735 | ; if you are running php as a CGI under any web server (other than IIS) 736 | ; see documentation for security issues. The alternate is to use the 737 | ; cgi.force_redirect configuration below 738 | ; http://php.net/doc-root 739 | doc_root = 740 | 741 | ; The directory under which PHP opens the script using /~username used only 742 | ; if nonempty. 743 | ; http://php.net/user-dir 744 | user_dir = 745 | 746 | ; Directory in which the loadable extensions (modules) reside. 747 | ; http://php.net/extension-dir 748 | ;extension_dir = "./" 749 | ; On windows: 750 | ;extension_dir = "ext" 751 | 752 | ; Directory where the temporary files should be placed. 753 | ; Defaults to the system default (see sys_get_temp_dir) 754 | ;sys_temp_dir = "/tmp" 755 | 756 | ; Whether or not to enable the dl() function. The dl() function does NOT work 757 | ; properly in multithreaded servers, such as IIS or Zeus, and is automatically 758 | ; disabled on them. 759 | ; http://php.net/enable-dl 760 | enable_dl = Off 761 | 762 | ; cgi.force_redirect is necessary to provide security running PHP as a CGI under 763 | ; most web servers. Left undefined, PHP turns this on by default. You can 764 | ; turn it off here AT YOUR OWN RISK 765 | ; **You CAN safely turn this off for IIS, in fact, you MUST.** 766 | ; http://php.net/cgi.force-redirect 767 | ;cgi.force_redirect = 1 768 | 769 | ; if cgi.nph is enabled it will force cgi to always sent Status: 200 with 770 | ; every request. PHP's default behavior is to disable this feature. 771 | ;cgi.nph = 1 772 | 773 | ; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape 774 | ; (iPlanet) web servers, you MAY need to set an environment variable name that PHP 775 | ; will look for to know it is OK to continue execution. Setting this variable MAY 776 | ; cause security issues, KNOW WHAT YOU ARE DOING FIRST. 777 | ; http://php.net/cgi.redirect-status-env 778 | ;cgi.redirect_status_env = 779 | 780 | ; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's 781 | ; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok 782 | ; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting 783 | ; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting 784 | ; of zero causes PHP to behave as before. Default is 1. You should fix your scripts 785 | ; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. 786 | ; http://php.net/cgi.fix-pathinfo 787 | ;cgi.fix_pathinfo=1 788 | 789 | ; if cgi.discard_path is enabled, the PHP CGI binary can safely be placed outside 790 | ; of the web tree and people will not be able to circumvent .htaccess security. 791 | ;cgi.discard_path=1 792 | 793 | ; FastCGI under IIS supports the ability to impersonate 794 | ; security tokens of the calling client. This allows IIS to define the 795 | ; security context that the request runs under. mod_fastcgi under Apache 796 | ; does not currently support this feature (03/17/2002) 797 | ; Set to 1 if running under IIS. Default is zero. 798 | ; http://php.net/fastcgi.impersonate 799 | ;fastcgi.impersonate = 1 800 | 801 | ; Disable logging through FastCGI connection. PHP's default behavior is to enable 802 | ; this feature. 803 | ;fastcgi.logging = 0 804 | 805 | ; cgi.rfc2616_headers configuration option tells PHP what type of headers to 806 | ; use when sending HTTP response code. If set to 0, PHP sends Status: header that 807 | ; is supported by Apache. When this option is set to 1, PHP will send 808 | ; RFC2616 compliant header. 809 | ; Default is zero. 810 | ; http://php.net/cgi.rfc2616-headers 811 | ;cgi.rfc2616_headers = 0 812 | 813 | ; cgi.check_shebang_line controls whether CGI PHP checks for line starting with #! 814 | ; (shebang) at the top of the running script. This line might be needed if the 815 | ; script support running both as stand-alone script and via PHP CGI<. PHP in CGI 816 | ; mode skips this line and ignores its content if this directive is turned on. 817 | ; http://php.net/cgi.check-shebang-line 818 | ;cgi.check_shebang_line=1 819 | 820 | ;;;;;;;;;;;;;;;; 821 | ; File Uploads ; 822 | ;;;;;;;;;;;;;;;; 823 | 824 | ; Whether to allow HTTP file uploads. 825 | ; http://php.net/file-uploads 826 | file_uploads = On 827 | 828 | ; Temporary directory for HTTP uploaded files (will use system default if not 829 | ; specified). 830 | ; http://php.net/upload-tmp-dir 831 | upload_tmp_dir = "/tmp" 832 | 833 | ; Maximum allowed size for uploaded files. 834 | ; http://php.net/upload-max-filesize 835 | upload_max_filesize = 20M 836 | 837 | ; Maximum number of files that can be uploaded via a single request 838 | max_file_uploads = 20 839 | 840 | ;;;;;;;;;;;;;;;;;; 841 | ; Fopen wrappers ; 842 | ;;;;;;;;;;;;;;;;;; 843 | 844 | ; Whether to allow the treatment of URLs (like http:// or ftp://) as files. 845 | ; http://php.net/allow-url-fopen 846 | allow_url_fopen = On 847 | 848 | ; Whether to allow include/require to open URLs (like http:// or ftp://) as files. 849 | ; http://php.net/allow-url-include 850 | allow_url_include = Off 851 | 852 | ; Define the anonymous ftp password (your email address). PHP's default setting 853 | ; for this is empty. 854 | ; http://php.net/from 855 | ;from="john@doe.com" 856 | 857 | ; Define the User-Agent string. PHP's default setting for this is empty. 858 | ; http://php.net/user-agent 859 | ;user_agent="PHP" 860 | 861 | ; Default timeout for socket based streams (seconds) 862 | ; http://php.net/default-socket-timeout 863 | default_socket_timeout = 60 864 | 865 | ; If your scripts have to deal with files from Macintosh systems, 866 | ; or you are running on a Mac and need to deal with files from 867 | ; unix or win32 systems, setting this flag will cause PHP to 868 | ; automatically detect the EOL character in those files so that 869 | ; fgets() and file() will work regardless of the source of the file. 870 | ; http://php.net/auto-detect-line-endings 871 | ;auto_detect_line_endings = Off 872 | 873 | ;;;;;;;;;;;;;;;;;;;;;; 874 | ; Dynamic Extensions ; 875 | ;;;;;;;;;;;;;;;;;;;;;; 876 | 877 | ; If you wish to have an extension loaded automatically, use the following 878 | ; syntax: 879 | ; 880 | ; extension=modulename 881 | ; 882 | ; For example: 883 | ; 884 | ; extension=mysqli 885 | ; 886 | ; When the extension library to load is not located in the default extension 887 | ; directory, You may specify an absolute path to the library file: 888 | ; 889 | ; extension=/path/to/extension/mysqli.so 890 | ; 891 | ; Note : The syntax used in previous PHP versions ('extension=.so' and 892 | ; 'extension='php_.dll') is supported for legacy reasons and may be 893 | ; deprecated in a future PHP major version. So, when it is possible, please 894 | ; move to the new ('extension=) syntax. 895 | ; 896 | ; Notes for Windows environments : 897 | ; 898 | ; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+) 899 | ; extension folders as well as the separate PECL DLL download (PHP 5+). 900 | ; Be sure to appropriately set the extension_dir directive. 901 | ; 902 | ;extension=bz2 903 | ;extension=curl 904 | ;extension=fileinfo 905 | ;extension=gd2 906 | ;extension=gettext 907 | ;extension=gmp 908 | ;extension=intl 909 | ;extension=imap 910 | ;extension=interbase 911 | ;extension=ldap 912 | ;extension=mbstring 913 | ;extension=exif ; Must be after mbstring as it depends on it 914 | ;extension=mysqli 915 | ;extension=oci8_12c ; Use with Oracle Database 12c Instant Client 916 | ;extension=odbc 917 | ;extension=openssl 918 | ;extension=pdo_firebird 919 | ;extension=pdo_mysql 920 | ;extension=pdo_oci 921 | ;extension=pdo_odbc 922 | ;extension=pdo_pgsql 923 | ;extension=pdo_sqlite 924 | ;extension=pgsql 925 | ;extension=shmop 926 | 927 | ; The MIBS data available in the PHP distribution must be installed. 928 | ; See http://www.php.net/manual/en/snmp.installation.php 929 | ;extension=snmp 930 | 931 | ;extension=soap 932 | ;extension=sockets 933 | ;extension=sodium 934 | ;extension=sqlite3 935 | ;extension=tidy 936 | ;extension=xmlrpc 937 | ;extension=xsl 938 | 939 | ;;;;;;;;;;;;;;;;;;; 940 | ; Module Settings ; 941 | ;;;;;;;;;;;;;;;;;;; 942 | 943 | [CLI Server] 944 | ; Whether the CLI web server uses ANSI color coding in its terminal output. 945 | cli_server.color = On 946 | 947 | [Date] 948 | ; Defines the default timezone used by the date functions 949 | ; http://php.net/date.timezone 950 | date.timezone = "Asia/Shanghai" 951 | 952 | ; http://php.net/date.default-latitude 953 | ;date.default_latitude = 31.7667 954 | 955 | ; http://php.net/date.default-longitude 956 | ;date.default_longitude = 35.2333 957 | 958 | ; http://php.net/date.sunrise-zenith 959 | ;date.sunrise_zenith = 90.583333 960 | 961 | ; http://php.net/date.sunset-zenith 962 | ;date.sunset_zenith = 90.583333 963 | 964 | [filter] 965 | ; http://php.net/filter.default 966 | ;filter.default = unsafe_raw 967 | 968 | ; http://php.net/filter.default-flags 969 | ;filter.default_flags = 970 | 971 | [iconv] 972 | ; Use of this INI entry is deprecated, use global input_encoding instead. 973 | ; If empty, default_charset or input_encoding or iconv.input_encoding is used. 974 | ; The precedence is: default_charset < input_encoding < iconv.input_encoding 975 | ;iconv.input_encoding = 976 | 977 | ; Use of this INI entry is deprecated, use global internal_encoding instead. 978 | ; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. 979 | ; The precedence is: default_charset < internal_encoding < iconv.internal_encoding 980 | ;iconv.internal_encoding = 981 | 982 | ; Use of this INI entry is deprecated, use global output_encoding instead. 983 | ; If empty, default_charset or output_encoding or iconv.output_encoding is used. 984 | ; The precedence is: default_charset < output_encoding < iconv.output_encoding 985 | ; To use an output encoding conversion, iconv's output handler must be set 986 | ; otherwise output encoding conversion cannot be performed. 987 | ;iconv.output_encoding = 988 | 989 | [imap] 990 | ; rsh/ssh logins are disabled by default. Use this INI entry if you want to 991 | ; enable them. Note that the IMAP library does not filter mailbox names before 992 | ; passing them to rsh/ssh command, thus passing untrusted data to this function 993 | ; with rsh/ssh enabled is insecure. 994 | ;imap.enable_insecure_rsh=0 995 | 996 | [intl] 997 | ;intl.default_locale = 998 | ; This directive allows you to produce PHP errors when some error 999 | ; happens within intl functions. The value is the level of the error produced. 1000 | ; Default is 0, which does not produce any errors. 1001 | ;intl.error_level = E_WARNING 1002 | ;intl.use_exceptions = 0 1003 | 1004 | [sqlite3] 1005 | ;sqlite3.extension_dir = 1006 | 1007 | [Pcre] 1008 | ; PCRE library backtracking limit. 1009 | ; http://php.net/pcre.backtrack-limit 1010 | ;pcre.backtrack_limit=100000 1011 | 1012 | ; PCRE library recursion limit. 1013 | ; Please note that if you set this value to a high number you may consume all 1014 | ; the available process stack and eventually crash PHP (due to reaching the 1015 | ; stack size limit imposed by the Operating System). 1016 | ; http://php.net/pcre.recursion-limit 1017 | ;pcre.recursion_limit=100000 1018 | 1019 | ; Enables or disables JIT compilation of patterns. This requires the PCRE 1020 | ; library to be compiled with JIT support. 1021 | ;pcre.jit=1 1022 | 1023 | [Pdo] 1024 | ; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off" 1025 | ; http://php.net/pdo-odbc.connection-pooling 1026 | ;pdo_odbc.connection_pooling=strict 1027 | 1028 | ;pdo_odbc.db2_instance_name 1029 | 1030 | [Pdo_mysql] 1031 | ; Default socket name for local MySQL connects. If empty, uses the built-in 1032 | ; MySQL defaults. 1033 | pdo_mysql.default_socket= 1034 | 1035 | [Phar] 1036 | ; http://php.net/phar.readonly 1037 | ;phar.readonly = On 1038 | 1039 | ; http://php.net/phar.require-hash 1040 | ;phar.require_hash = On 1041 | 1042 | ;phar.cache_list = 1043 | 1044 | [mail function] 1045 | ; For Win32 only. 1046 | ; http://php.net/smtp 1047 | SMTP = localhost 1048 | ; http://php.net/smtp-port 1049 | smtp_port = 25 1050 | 1051 | ; For Win32 only. 1052 | ; http://php.net/sendmail-from 1053 | ;sendmail_from = me@example.com 1054 | 1055 | ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). 1056 | ; http://php.net/sendmail-path 1057 | ;sendmail_path = 1058 | 1059 | ; Force the addition of the specified parameters to be passed as extra parameters 1060 | ; to the sendmail binary. These parameters will always replace the value of 1061 | ; the 5th parameter to mail(). 1062 | ;mail.force_extra_parameters = 1063 | 1064 | ; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename 1065 | mail.add_x_header = Off 1066 | 1067 | ; The path to a log file that will log all mail() calls. Log entries include 1068 | ; the full path of the script, line number, To address and headers. 1069 | ;mail.log = 1070 | ; Log mail to syslog (Event Log on Windows). 1071 | ;mail.log = syslog 1072 | 1073 | [ODBC] 1074 | ; http://php.net/odbc.default-db 1075 | ;odbc.default_db = Not yet implemented 1076 | 1077 | ; http://php.net/odbc.default-user 1078 | ;odbc.default_user = Not yet implemented 1079 | 1080 | ; http://php.net/odbc.default-pw 1081 | ;odbc.default_pw = Not yet implemented 1082 | 1083 | ; Controls the ODBC cursor model. 1084 | ; Default: SQL_CURSOR_STATIC (default). 1085 | ;odbc.default_cursortype 1086 | 1087 | ; Allow or prevent persistent links. 1088 | ; http://php.net/odbc.allow-persistent 1089 | odbc.allow_persistent = On 1090 | 1091 | ; Check that a connection is still valid before reuse. 1092 | ; http://php.net/odbc.check-persistent 1093 | odbc.check_persistent = On 1094 | 1095 | ; Maximum number of persistent links. -1 means no limit. 1096 | ; http://php.net/odbc.max-persistent 1097 | odbc.max_persistent = -1 1098 | 1099 | ; Maximum number of links (persistent + non-persistent). -1 means no limit. 1100 | ; http://php.net/odbc.max-links 1101 | odbc.max_links = -1 1102 | 1103 | ; Handling of LONG fields. Returns number of bytes to variables. 0 means 1104 | ; passthru. 1105 | ; http://php.net/odbc.defaultlrl 1106 | odbc.defaultlrl = 4096 1107 | 1108 | ; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char. 1109 | ; See the documentation on odbc_binmode and odbc_longreadlen for an explanation 1110 | ; of odbc.defaultlrl and odbc.defaultbinmode 1111 | ; http://php.net/odbc.defaultbinmode 1112 | odbc.defaultbinmode = 1 1113 | 1114 | [Interbase] 1115 | ; Allow or prevent persistent links. 1116 | ibase.allow_persistent = 1 1117 | 1118 | ; Maximum number of persistent links. -1 means no limit. 1119 | ibase.max_persistent = -1 1120 | 1121 | ; Maximum number of links (persistent + non-persistent). -1 means no limit. 1122 | ibase.max_links = -1 1123 | 1124 | ; Default database name for ibase_connect(). 1125 | ;ibase.default_db = 1126 | 1127 | ; Default username for ibase_connect(). 1128 | ;ibase.default_user = 1129 | 1130 | ; Default password for ibase_connect(). 1131 | ;ibase.default_password = 1132 | 1133 | ; Default charset for ibase_connect(). 1134 | ;ibase.default_charset = 1135 | 1136 | ; Default timestamp format. 1137 | ibase.timestampformat = "%Y-%m-%d %H:%M:%S" 1138 | 1139 | ; Default date format. 1140 | ibase.dateformat = "%Y-%m-%d" 1141 | 1142 | ; Default time format. 1143 | ibase.timeformat = "%H:%M:%S" 1144 | 1145 | [MySQLi] 1146 | 1147 | ; Maximum number of persistent links. -1 means no limit. 1148 | ; http://php.net/mysqli.max-persistent 1149 | mysqli.max_persistent = -1 1150 | 1151 | ; Allow accessing, from PHP's perspective, local files with LOAD DATA statements 1152 | ; http://php.net/mysqli.allow_local_infile 1153 | ;mysqli.allow_local_infile = On 1154 | 1155 | ; Allow or prevent persistent links. 1156 | ; http://php.net/mysqli.allow-persistent 1157 | mysqli.allow_persistent = On 1158 | 1159 | ; Maximum number of links. -1 means no limit. 1160 | ; http://php.net/mysqli.max-links 1161 | mysqli.max_links = -1 1162 | 1163 | ; Default port number for mysqli_connect(). If unset, mysqli_connect() will use 1164 | ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the 1165 | ; compile-time value defined MYSQL_PORT (in that order). Win32 will only look 1166 | ; at MYSQL_PORT. 1167 | ; http://php.net/mysqli.default-port 1168 | mysqli.default_port = 3306 1169 | 1170 | ; Default socket name for local MySQL connects. If empty, uses the built-in 1171 | ; MySQL defaults. 1172 | ; http://php.net/mysqli.default-socket 1173 | mysqli.default_socket = 1174 | 1175 | ; Default host for mysql_connect() (doesn't apply in safe mode). 1176 | ; http://php.net/mysqli.default-host 1177 | mysqli.default_host = 1178 | 1179 | ; Default user for mysql_connect() (doesn't apply in safe mode). 1180 | ; http://php.net/mysqli.default-user 1181 | mysqli.default_user = 1182 | 1183 | ; Default password for mysqli_connect() (doesn't apply in safe mode). 1184 | ; Note that this is generally a *bad* idea to store passwords in this file. 1185 | ; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw") 1186 | ; and reveal this password! And of course, any users with read access to this 1187 | ; file will be able to reveal the password as well. 1188 | ; http://php.net/mysqli.default-pw 1189 | mysqli.default_pw = 1190 | 1191 | ; Allow or prevent reconnect 1192 | mysqli.reconnect = Off 1193 | 1194 | [mysqlnd] 1195 | ; Enable / Disable collection of general statistics by mysqlnd which can be 1196 | ; used to tune and monitor MySQL operations. 1197 | mysqlnd.collect_statistics = On 1198 | 1199 | ; Enable / Disable collection of memory usage statistics by mysqlnd which can be 1200 | ; used to tune and monitor MySQL operations. 1201 | mysqlnd.collect_memory_statistics = On 1202 | 1203 | ; Records communication from all extensions using mysqlnd to the specified log 1204 | ; file. 1205 | ; http://php.net/mysqlnd.debug 1206 | ;mysqlnd.debug = 1207 | 1208 | ; Defines which queries will be logged. 1209 | ;mysqlnd.log_mask = 0 1210 | 1211 | ; Default size of the mysqlnd memory pool, which is used by result sets. 1212 | ;mysqlnd.mempool_default_size = 16000 1213 | 1214 | ; Size of a pre-allocated buffer used when sending commands to MySQL in bytes. 1215 | ;mysqlnd.net_cmd_buffer_size = 2048 1216 | 1217 | ; Size of a pre-allocated buffer used for reading data sent by the server in 1218 | ; bytes. 1219 | ;mysqlnd.net_read_buffer_size = 32768 1220 | 1221 | ; Timeout for network requests in seconds. 1222 | ;mysqlnd.net_read_timeout = 31536000 1223 | 1224 | ; SHA-256 Authentication Plugin related. File with the MySQL server public RSA 1225 | ; key. 1226 | ;mysqlnd.sha256_server_public_key = 1227 | 1228 | [OCI8] 1229 | 1230 | ; Connection: Enables privileged connections using external 1231 | ; credentials (OCI_SYSOPER, OCI_SYSDBA) 1232 | ; http://php.net/oci8.privileged-connect 1233 | ;oci8.privileged_connect = Off 1234 | 1235 | ; Connection: The maximum number of persistent OCI8 connections per 1236 | ; process. Using -1 means no limit. 1237 | ; http://php.net/oci8.max-persistent 1238 | ;oci8.max_persistent = -1 1239 | 1240 | ; Connection: The maximum number of seconds a process is allowed to 1241 | ; maintain an idle persistent connection. Using -1 means idle 1242 | ; persistent connections will be maintained forever. 1243 | ; http://php.net/oci8.persistent-timeout 1244 | ;oci8.persistent_timeout = -1 1245 | 1246 | ; Connection: The number of seconds that must pass before issuing a 1247 | ; ping during oci_pconnect() to check the connection validity. When 1248 | ; set to 0, each oci_pconnect() will cause a ping. Using -1 disables 1249 | ; pings completely. 1250 | ; http://php.net/oci8.ping-interval 1251 | ;oci8.ping_interval = 60 1252 | 1253 | ; Connection: Set this to a user chosen connection class to be used 1254 | ; for all pooled server requests with Oracle 11g Database Resident 1255 | ; Connection Pooling (DRCP). To use DRCP, this value should be set to 1256 | ; the same string for all web servers running the same application, 1257 | ; the database pool must be configured, and the connection string must 1258 | ; specify to use a pooled server. 1259 | ;oci8.connection_class = 1260 | 1261 | ; High Availability: Using On lets PHP receive Fast Application 1262 | ; Notification (FAN) events generated when a database node fails. The 1263 | ; database must also be configured to post FAN events. 1264 | ;oci8.events = Off 1265 | 1266 | ; Tuning: This option enables statement caching, and specifies how 1267 | ; many statements to cache. Using 0 disables statement caching. 1268 | ; http://php.net/oci8.statement-cache-size 1269 | ;oci8.statement_cache_size = 20 1270 | 1271 | ; Tuning: Enables statement prefetching and sets the default number of 1272 | ; rows that will be fetched automatically after statement execution. 1273 | ; http://php.net/oci8.default-prefetch 1274 | ;oci8.default_prefetch = 100 1275 | 1276 | ; Compatibility. Using On means oci_close() will not close 1277 | ; oci_connect() and oci_new_connect() connections. 1278 | ; http://php.net/oci8.old-oci-close-semantics 1279 | ;oci8.old_oci_close_semantics = Off 1280 | 1281 | [PostgreSQL] 1282 | ; Allow or prevent persistent links. 1283 | ; http://php.net/pgsql.allow-persistent 1284 | pgsql.allow_persistent = On 1285 | 1286 | ; Detect broken persistent links always with pg_pconnect(). 1287 | ; Auto reset feature requires a little overheads. 1288 | ; http://php.net/pgsql.auto-reset-persistent 1289 | pgsql.auto_reset_persistent = Off 1290 | 1291 | ; Maximum number of persistent links. -1 means no limit. 1292 | ; http://php.net/pgsql.max-persistent 1293 | pgsql.max_persistent = -1 1294 | 1295 | ; Maximum number of links (persistent+non persistent). -1 means no limit. 1296 | ; http://php.net/pgsql.max-links 1297 | pgsql.max_links = -1 1298 | 1299 | ; Ignore PostgreSQL backends Notice message or not. 1300 | ; Notice message logging require a little overheads. 1301 | ; http://php.net/pgsql.ignore-notice 1302 | pgsql.ignore_notice = 0 1303 | 1304 | ; Log PostgreSQL backends Notice message or not. 1305 | ; Unless pgsql.ignore_notice=0, module cannot log notice message. 1306 | ; http://php.net/pgsql.log-notice 1307 | pgsql.log_notice = 0 1308 | 1309 | [bcmath] 1310 | ; Number of decimal digits for all bcmath functions. 1311 | ; http://php.net/bcmath.scale 1312 | bcmath.scale = 0 1313 | 1314 | [browscap] 1315 | ; http://php.net/browscap 1316 | ;browscap = extra/browscap.ini 1317 | 1318 | [Session] 1319 | ; Handler used to store/retrieve data. 1320 | ; http://php.net/session.save-handler 1321 | session.save_handler = files 1322 | 1323 | ; Argument passed to save_handler. In the case of files, this is the path 1324 | ; where data files are stored. Note: Windows users have to change this 1325 | ; variable in order to use PHP's session functions. 1326 | ; 1327 | ; The path can be defined as: 1328 | ; 1329 | ; session.save_path = "N;/path" 1330 | ; 1331 | ; where N is an integer. Instead of storing all the session files in 1332 | ; /path, what this will do is use subdirectories N-levels deep, and 1333 | ; store the session data in those directories. This is useful if 1334 | ; your OS has problems with many files in one directory, and is 1335 | ; a more efficient layout for servers that handle many sessions. 1336 | ; 1337 | ; NOTE 1: PHP will not create this directory structure automatically. 1338 | ; You can use the script in the ext/session dir for that purpose. 1339 | ; NOTE 2: See the section on garbage collection below if you choose to 1340 | ; use subdirectories for session storage 1341 | ; 1342 | ; The file storage module creates files using mode 600 by default. 1343 | ; You can change that by using 1344 | ; 1345 | ; session.save_path = "N;MODE;/path" 1346 | ; 1347 | ; where MODE is the octal representation of the mode. Note that this 1348 | ; does not overwrite the process's umask. 1349 | ; http://php.net/session.save-path 1350 | session.save_path = "/tmp" 1351 | 1352 | ; Whether to use strict session mode. 1353 | ; Strict session mode does not accept an uninitialized session ID, and 1354 | ; regenerates the session ID if the browser sends an uninitialized session ID. 1355 | ; Strict mode protects applications from session fixation via a session adoption 1356 | ; vulnerability. It is disabled by default for maximum compatibility, but 1357 | ; enabling it is encouraged. 1358 | ; https://wiki.php.net/rfc/strict_sessions 1359 | session.use_strict_mode = 0 1360 | 1361 | ; Whether to use cookies. 1362 | ; http://php.net/session.use-cookies 1363 | session.use_cookies = 1 1364 | 1365 | ; http://php.net/session.cookie-secure 1366 | ;session.cookie_secure = 1367 | 1368 | ; This option forces PHP to fetch and use a cookie for storing and maintaining 1369 | ; the session id. We encourage this operation as it's very helpful in combating 1370 | ; session hijacking when not specifying and managing your own session id. It is 1371 | ; not the be-all and end-all of session hijacking defense, but it's a good start. 1372 | ; http://php.net/session.use-only-cookies 1373 | session.use_only_cookies = 1 1374 | 1375 | ; Name of the session (used as cookie name). 1376 | ; http://php.net/session.name 1377 | session.name = PHPSESSID 1378 | 1379 | ; Initialize session on request startup. 1380 | ; http://php.net/session.auto-start 1381 | session.auto_start = 0 1382 | 1383 | ; Lifetime in seconds of cookie or, if 0, until browser is restarted. 1384 | ; http://php.net/session.cookie-lifetime 1385 | session.cookie_lifetime = 0 1386 | 1387 | ; The path for which the cookie is valid. 1388 | ; http://php.net/session.cookie-path 1389 | session.cookie_path = / 1390 | 1391 | ; The domain for which the cookie is valid. 1392 | ; http://php.net/session.cookie-domain 1393 | session.cookie_domain = 1394 | 1395 | ; Whether or not to add the httpOnly flag to the cookie, which makes it 1396 | ; inaccessible to browser scripting languages such as JavaScript. 1397 | ; http://php.net/session.cookie-httponly 1398 | session.cookie_httponly = 1399 | 1400 | ; Add SameSite attribute to cookie to help mitigate Cross-Site Request Forgery (CSRF/XSRF) 1401 | ; Current valid values are "Lax" or "Strict" 1402 | ; https://tools.ietf.org/html/draft-west-first-party-cookies-07 1403 | session.cookie_samesite = 1404 | 1405 | ; Handler used to serialize data. php is the standard serializer of PHP. 1406 | ; http://php.net/session.serialize-handler 1407 | session.serialize_handler = php 1408 | 1409 | ; Defines the probability that the 'garbage collection' process is started 1410 | ; on every session initialization. The probability is calculated by using 1411 | ; gc_probability/gc_divisor. Where session.gc_probability is the numerator 1412 | ; and gc_divisor is the denominator in the equation. Setting this value to 1 1413 | ; when the session.gc_divisor value is 100 will give you approximately a 1% chance 1414 | ; the gc will run on any given request. 1415 | ; Default Value: 1 1416 | ; Development Value: 1 1417 | ; Production Value: 1 1418 | ; http://php.net/session.gc-probability 1419 | session.gc_probability = 1 1420 | 1421 | ; Defines the probability that the 'garbage collection' process is started on every 1422 | ; session initialization. The probability is calculated by using the following equation: 1423 | ; gc_probability/gc_divisor. Where session.gc_probability is the numerator and 1424 | ; session.gc_divisor is the denominator in the equation. Setting this value to 100 1425 | ; when the session.gc_probability value is 1 will give you approximately a 1% chance 1426 | ; the gc will run on any given request. Increasing this value to 1000 will give you 1427 | ; a 0.1% chance the gc will run on any given request. For high volume production servers, 1428 | ; this is a more efficient approach. 1429 | ; Default Value: 100 1430 | ; Development Value: 1000 1431 | ; Production Value: 1000 1432 | ; http://php.net/session.gc-divisor 1433 | session.gc_divisor = 1000 1434 | 1435 | ; After this number of seconds, stored data will be seen as 'garbage' and 1436 | ; cleaned up by the garbage collection process. 1437 | ; http://php.net/session.gc-maxlifetime 1438 | session.gc_maxlifetime = 1440 1439 | 1440 | ; NOTE: If you are using the subdirectory option for storing session files 1441 | ; (see session.save_path above), then garbage collection does *not* 1442 | ; happen automatically. You will need to do your own garbage 1443 | ; collection through a shell script, cron entry, or some other method. 1444 | ; For example, the following script would is the equivalent of 1445 | ; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): 1446 | ; find /path/to/sessions -cmin +24 -type f | xargs rm 1447 | 1448 | ; Check HTTP Referer to invalidate externally stored URLs containing ids. 1449 | ; HTTP_REFERER has to contain this substring for the session to be 1450 | ; considered as valid. 1451 | ; http://php.net/session.referer-check 1452 | session.referer_check = 1453 | 1454 | ; Set to {nocache,private,public,} to determine HTTP caching aspects 1455 | ; or leave this empty to avoid sending anti-caching headers. 1456 | ; http://php.net/session.cache-limiter 1457 | session.cache_limiter = nocache 1458 | 1459 | ; Document expires after n minutes. 1460 | ; http://php.net/session.cache-expire 1461 | session.cache_expire = 180 1462 | 1463 | ; trans sid support is disabled by default. 1464 | ; Use of trans sid may risk your users' security. 1465 | ; Use this option with caution. 1466 | ; - User may send URL contains active session ID 1467 | ; to other person via. email/irc/etc. 1468 | ; - URL that contains active session ID may be stored 1469 | ; in publicly accessible computer. 1470 | ; - User may access your site with the same session ID 1471 | ; always using URL stored in browser's history or bookmarks. 1472 | ; http://php.net/session.use-trans-sid 1473 | session.use_trans_sid = 0 1474 | 1475 | ; Set session ID character length. This value could be between 22 to 256. 1476 | ; Shorter length than default is supported only for compatibility reason. 1477 | ; Users should use 32 or more chars. 1478 | ; http://php.net/session.sid-length 1479 | ; Default Value: 32 1480 | ; Development Value: 26 1481 | ; Production Value: 26 1482 | session.sid_length = 26 1483 | 1484 | ; The URL rewriter will look for URLs in a defined set of HTML tags. 1485 | ;
is special; if you include them here, the rewriter will 1486 | ; add a hidden field with the info which is otherwise appended 1487 | ; to URLs. tag's action attribute URL will not be modified 1488 | ; unless it is specified. 1489 | ; Note that all valid entries require a "=", even if no value follows. 1490 | ; Default Value: "a=href,area=href,frame=src,form=" 1491 | ; Development Value: "a=href,area=href,frame=src,form=" 1492 | ; Production Value: "a=href,area=href,frame=src,form=" 1493 | ; http://php.net/url-rewriter.tags 1494 | session.trans_sid_tags = "a=href,area=href,frame=src,form=" 1495 | 1496 | ; URL rewriter does not rewrite absolute URLs by default. 1497 | ; To enable rewrites for absolute paths, target hosts must be specified 1498 | ; at RUNTIME. i.e. use ini_set() 1499 | ; tags is special. PHP will check action attribute's URL regardless 1500 | ; of session.trans_sid_tags setting. 1501 | ; If no host is defined, HTTP_HOST will be used for allowed host. 1502 | ; Example value: php.net,www.php.net,wiki.php.net 1503 | ; Use "," for multiple hosts. No spaces are allowed. 1504 | ; Default Value: "" 1505 | ; Development Value: "" 1506 | ; Production Value: "" 1507 | ;session.trans_sid_hosts="" 1508 | 1509 | ; Define how many bits are stored in each character when converting 1510 | ; the binary hash data to something readable. 1511 | ; Possible values: 1512 | ; 4 (4 bits: 0-9, a-f) 1513 | ; 5 (5 bits: 0-9, a-v) 1514 | ; 6 (6 bits: 0-9, a-z, A-Z, "-", ",") 1515 | ; Default Value: 4 1516 | ; Development Value: 5 1517 | ; Production Value: 5 1518 | ; http://php.net/session.hash-bits-per-character 1519 | session.sid_bits_per_character = 5 1520 | 1521 | ; Enable upload progress tracking in $_SESSION 1522 | ; Default Value: On 1523 | ; Development Value: On 1524 | ; Production Value: On 1525 | ; http://php.net/session.upload-progress.enabled 1526 | ;session.upload_progress.enabled = On 1527 | 1528 | ; Cleanup the progress information as soon as all POST data has been read 1529 | ; (i.e. upload completed). 1530 | ; Default Value: On 1531 | ; Development Value: On 1532 | ; Production Value: On 1533 | ; http://php.net/session.upload-progress.cleanup 1534 | ;session.upload_progress.cleanup = On 1535 | 1536 | ; A prefix used for the upload progress key in $_SESSION 1537 | ; Default Value: "upload_progress_" 1538 | ; Development Value: "upload_progress_" 1539 | ; Production Value: "upload_progress_" 1540 | ; http://php.net/session.upload-progress.prefix 1541 | ;session.upload_progress.prefix = "upload_progress_" 1542 | 1543 | ; The index name (concatenated with the prefix) in $_SESSION 1544 | ; containing the upload progress information 1545 | ; Default Value: "PHP_SESSION_UPLOAD_PROGRESS" 1546 | ; Development Value: "PHP_SESSION_UPLOAD_PROGRESS" 1547 | ; Production Value: "PHP_SESSION_UPLOAD_PROGRESS" 1548 | ; http://php.net/session.upload-progress.name 1549 | ;session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS" 1550 | 1551 | ; How frequently the upload progress should be updated. 1552 | ; Given either in percentages (per-file), or in bytes 1553 | ; Default Value: "1%" 1554 | ; Development Value: "1%" 1555 | ; Production Value: "1%" 1556 | ; http://php.net/session.upload-progress.freq 1557 | ;session.upload_progress.freq = "1%" 1558 | 1559 | ; The minimum delay between updates, in seconds 1560 | ; Default Value: 1 1561 | ; Development Value: 1 1562 | ; Production Value: 1 1563 | ; http://php.net/session.upload-progress.min-freq 1564 | ;session.upload_progress.min_freq = "1" 1565 | 1566 | ; Only write session data when session data is changed. Enabled by default. 1567 | ; http://php.net/session.lazy-write 1568 | ;session.lazy_write = On 1569 | 1570 | [Assertion] 1571 | ; Switch whether to compile assertions at all (to have no overhead at run-time) 1572 | ; -1: Do not compile at all 1573 | ; 0: Jump over assertion at run-time 1574 | ; 1: Execute assertions 1575 | ; Changing from or to a negative value is only possible in php.ini! (For turning assertions on and off at run-time, see assert.active, when zend.assertions = 1) 1576 | ; Default Value: 1 1577 | ; Development Value: 1 1578 | ; Production Value: -1 1579 | ; http://php.net/zend.assertions 1580 | zend.assertions = 1 1581 | 1582 | ; Assert(expr); active by default. 1583 | ; http://php.net/assert.active 1584 | ;assert.active = On 1585 | 1586 | ; Throw an AssertionError on failed assertions 1587 | ; http://php.net/assert.exception 1588 | ;assert.exception = On 1589 | 1590 | ; Issue a PHP warning for each failed assertion. (Overridden by assert.exception if active) 1591 | ; http://php.net/assert.warning 1592 | ;assert.warning = On 1593 | 1594 | ; Don't bail out by default. 1595 | ; http://php.net/assert.bail 1596 | ;assert.bail = Off 1597 | 1598 | ; User-function to be called if an assertion fails. 1599 | ; http://php.net/assert.callback 1600 | ;assert.callback = 0 1601 | 1602 | ; Eval the expression with current error_reporting(). Set to true if you want 1603 | ; error_reporting(0) around the eval(). 1604 | ; http://php.net/assert.quiet-eval 1605 | ;assert.quiet_eval = 0 1606 | 1607 | [COM] 1608 | ; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs 1609 | ; http://php.net/com.typelib-file 1610 | ;com.typelib_file = 1611 | 1612 | ; allow Distributed-COM calls 1613 | ; http://php.net/com.allow-dcom 1614 | ;com.allow_dcom = true 1615 | 1616 | ; autoregister constants of a component's typlib on com_load() 1617 | ; http://php.net/com.autoregister-typelib 1618 | ;com.autoregister_typelib = true 1619 | 1620 | ; register constants casesensitive 1621 | ; http://php.net/com.autoregister-casesensitive 1622 | ;com.autoregister_casesensitive = false 1623 | 1624 | ; show warnings on duplicate constant registrations 1625 | ; http://php.net/com.autoregister-verbose 1626 | ;com.autoregister_verbose = true 1627 | 1628 | ; The default character set code-page to use when passing strings to and from COM objects. 1629 | ; Default: system ANSI code page 1630 | ;com.code_page= 1631 | 1632 | [mbstring] 1633 | ; language for internal character representation. 1634 | ; This affects mb_send_mail() and mbstring.detect_order. 1635 | ; http://php.net/mbstring.language 1636 | ;mbstring.language = Japanese 1637 | 1638 | ; Use of this INI entry is deprecated, use global internal_encoding instead. 1639 | ; internal/script encoding. 1640 | ; Some encoding cannot work as internal encoding. (e.g. SJIS, BIG5, ISO-2022-*) 1641 | ; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. 1642 | ; The precedence is: default_charset < internal_encoding < iconv.internal_encoding 1643 | ;mbstring.internal_encoding = 1644 | 1645 | ; Use of this INI entry is deprecated, use global input_encoding instead. 1646 | ; http input encoding. 1647 | ; mbstring.encoding_translation = On is needed to use this setting. 1648 | ; If empty, default_charset or input_encoding or mbstring.input is used. 1649 | ; The precedence is: default_charset < input_encoding < mbsting.http_input 1650 | ; http://php.net/mbstring.http-input 1651 | ;mbstring.http_input = 1652 | 1653 | ; Use of this INI entry is deprecated, use global output_encoding instead. 1654 | ; http output encoding. 1655 | ; mb_output_handler must be registered as output buffer to function. 1656 | ; If empty, default_charset or output_encoding or mbstring.http_output is used. 1657 | ; The precedence is: default_charset < output_encoding < mbstring.http_output 1658 | ; To use an output encoding conversion, mbstring's output handler must be set 1659 | ; otherwise output encoding conversion cannot be performed. 1660 | ; http://php.net/mbstring.http-output 1661 | ;mbstring.http_output = 1662 | 1663 | ; enable automatic encoding translation according to 1664 | ; mbstring.internal_encoding setting. Input chars are 1665 | ; converted to internal encoding by setting this to On. 1666 | ; Note: Do _not_ use automatic encoding translation for 1667 | ; portable libs/applications. 1668 | ; http://php.net/mbstring.encoding-translation 1669 | ;mbstring.encoding_translation = Off 1670 | 1671 | ; automatic encoding detection order. 1672 | ; "auto" detect order is changed according to mbstring.language 1673 | ; http://php.net/mbstring.detect-order 1674 | ;mbstring.detect_order = auto 1675 | 1676 | ; substitute_character used when character cannot be converted 1677 | ; one from another 1678 | ; http://php.net/mbstring.substitute-character 1679 | ;mbstring.substitute_character = none 1680 | 1681 | ; overload(replace) single byte functions by mbstring functions. 1682 | ; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(), 1683 | ; etc. Possible values are 0,1,2,4 or combination of them. 1684 | ; For example, 7 for overload everything. 1685 | ; 0: No overload 1686 | ; 1: Overload mail() function 1687 | ; 2: Overload str*() functions 1688 | ; 4: Overload ereg*() functions 1689 | ; http://php.net/mbstring.func-overload 1690 | ;mbstring.func_overload = 0 1691 | 1692 | ; enable strict encoding detection. 1693 | ; Default: Off 1694 | ;mbstring.strict_detection = On 1695 | 1696 | ; This directive specifies the regex pattern of content types for which mb_output_handler() 1697 | ; is activated. 1698 | ; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml) 1699 | ;mbstring.http_output_conv_mimetype= 1700 | 1701 | [gd] 1702 | ; Tell the jpeg decode to ignore warnings and try to create 1703 | ; a gd image. The warning will then be displayed as notices 1704 | ; disabled by default 1705 | ; http://php.net/gd.jpeg-ignore-warning 1706 | ;gd.jpeg_ignore_warning = 1 1707 | 1708 | [exif] 1709 | ; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS. 1710 | ; With mbstring support this will automatically be converted into the encoding 1711 | ; given by corresponding encode setting. When empty mbstring.internal_encoding 1712 | ; is used. For the decode settings you can distinguish between motorola and 1713 | ; intel byte order. A decode setting cannot be empty. 1714 | ; http://php.net/exif.encode-unicode 1715 | ;exif.encode_unicode = ISO-8859-15 1716 | 1717 | ; http://php.net/exif.decode-unicode-motorola 1718 | ;exif.decode_unicode_motorola = UCS-2BE 1719 | 1720 | ; http://php.net/exif.decode-unicode-intel 1721 | ;exif.decode_unicode_intel = UCS-2LE 1722 | 1723 | ; http://php.net/exif.encode-jis 1724 | ;exif.encode_jis = 1725 | 1726 | ; http://php.net/exif.decode-jis-motorola 1727 | ;exif.decode_jis_motorola = JIS 1728 | 1729 | ; http://php.net/exif.decode-jis-intel 1730 | ;exif.decode_jis_intel = JIS 1731 | 1732 | [Tidy] 1733 | ; The path to a default tidy configuration file to use when using tidy 1734 | ; http://php.net/tidy.default-config 1735 | ;tidy.default_config = /usr/local/lib/php/default.tcfg 1736 | 1737 | ; Should tidy clean and repair output automatically? 1738 | ; WARNING: Do not use this option if you are generating non-html content 1739 | ; such as dynamic images 1740 | ; http://php.net/tidy.clean-output 1741 | tidy.clean_output = Off 1742 | 1743 | [soap] 1744 | ; Enables or disables WSDL caching feature. 1745 | ; http://php.net/soap.wsdl-cache-enabled 1746 | soap.wsdl_cache_enabled=1 1747 | 1748 | ; Sets the directory name where SOAP extension will put cache files. 1749 | ; http://php.net/soap.wsdl-cache-dir 1750 | soap.wsdl_cache_dir="/tmp" 1751 | 1752 | ; (time to live) Sets the number of second while cached file will be used 1753 | ; instead of original one. 1754 | ; http://php.net/soap.wsdl-cache-ttl 1755 | soap.wsdl_cache_ttl=86400 1756 | 1757 | ; Sets the size of the cache limit. (Max. number of WSDL files to cache) 1758 | soap.wsdl_cache_limit = 5 1759 | 1760 | [sysvshm] 1761 | ; A default size of the shared memory segment 1762 | ;sysvshm.init_mem = 10000 1763 | 1764 | [ldap] 1765 | ; Sets the maximum number of open links or -1 for unlimited. 1766 | ldap.max_links = -1 1767 | 1768 | [dba] 1769 | ;dba.default_handler= 1770 | 1771 | [opcache] 1772 | ; Determines if Zend OPCache is enabled 1773 | ;opcache.enable=1 1774 | 1775 | ; Determines if Zend OPCache is enabled for the CLI version of PHP 1776 | ;opcache.enable_cli=0 1777 | 1778 | ; The OPcache shared memory storage size. 1779 | ;opcache.memory_consumption=128 1780 | 1781 | ; The amount of memory for interned strings in Mbytes. 1782 | ;opcache.interned_strings_buffer=8 1783 | 1784 | ; The maximum number of keys (scripts) in the OPcache hash table. 1785 | ; Only numbers between 200 and 1000000 are allowed. 1786 | ;opcache.max_accelerated_files=10000 1787 | 1788 | ; The maximum percentage of "wasted" memory until a restart is scheduled. 1789 | ;opcache.max_wasted_percentage=5 1790 | 1791 | ; When this directive is enabled, the OPcache appends the current working 1792 | ; directory to the script key, thus eliminating possible collisions between 1793 | ; files with the same name (basename). Disabling the directive improves 1794 | ; performance, but may break existing applications. 1795 | ;opcache.use_cwd=1 1796 | 1797 | ; When disabled, you must reset the OPcache manually or restart the 1798 | ; webserver for changes to the filesystem to take effect. 1799 | ;opcache.validate_timestamps=1 1800 | 1801 | ; How often (in seconds) to check file timestamps for changes to the shared 1802 | ; memory storage allocation. ("1" means validate once per second, but only 1803 | ; once per request. "0" means always validate) 1804 | ;opcache.revalidate_freq=2 1805 | 1806 | ; Enables or disables file search in include_path optimization 1807 | ;opcache.revalidate_path=0 1808 | 1809 | ; If disabled, all PHPDoc comments are dropped from the code to reduce the 1810 | ; size of the optimized code. 1811 | ;opcache.save_comments=1 1812 | 1813 | ; Allow file existence override (file_exists, etc.) performance feature. 1814 | ;opcache.enable_file_override=0 1815 | 1816 | ; A bitmask, where each bit enables or disables the appropriate OPcache 1817 | ; passes 1818 | ;opcache.optimization_level=0x7FFFBFFF 1819 | 1820 | ;opcache.dups_fix=0 1821 | 1822 | ; The location of the OPcache blacklist file (wildcards allowed). 1823 | ; Each OPcache blacklist file is a text file that holds the names of files 1824 | ; that should not be accelerated. The file format is to add each filename 1825 | ; to a new line. The filename may be a full path or just a file prefix 1826 | ; (i.e., /var/www/x blacklists all the files and directories in /var/www 1827 | ; that start with 'x'). Line starting with a ; are ignored (comments). 1828 | ;opcache.blacklist_filename= 1829 | 1830 | ; Allows exclusion of large files from being cached. By default all files 1831 | ; are cached. 1832 | ;opcache.max_file_size=0 1833 | 1834 | ; Check the cache checksum each N requests. 1835 | ; The default value of "0" means that the checks are disabled. 1836 | ;opcache.consistency_checks=0 1837 | 1838 | ; How long to wait (in seconds) for a scheduled restart to begin if the cache 1839 | ; is not being accessed. 1840 | ;opcache.force_restart_timeout=180 1841 | 1842 | ; OPcache error_log file name. Empty string assumes "stderr". 1843 | ;opcache.error_log= 1844 | 1845 | ; All OPcache errors go to the Web server log. 1846 | ; By default, only fatal errors (level 0) or errors (level 1) are logged. 1847 | ; You can also enable warnings (level 2), info messages (level 3) or 1848 | ; debug messages (level 4). 1849 | ;opcache.log_verbosity_level=1 1850 | 1851 | ; Preferred Shared Memory back-end. Leave empty and let the system decide. 1852 | ;opcache.preferred_memory_model= 1853 | 1854 | ; Protect the shared memory from unexpected writing during script execution. 1855 | ; Useful for internal debugging only. 1856 | ;opcache.protect_memory=0 1857 | 1858 | ; Allows calling OPcache API functions only from PHP scripts which path is 1859 | ; started from specified string. The default "" means no restriction 1860 | ;opcache.restrict_api= 1861 | 1862 | ; Mapping base of shared memory segments (for Windows only). All the PHP 1863 | ; processes have to map shared memory into the same address space. This 1864 | ; directive allows to manually fix the "Unable to reattach to base address" 1865 | ; errors. 1866 | ;opcache.mmap_base= 1867 | 1868 | ; Enables and sets the second level cache directory. 1869 | ; It should improve performance when SHM memory is full, at server restart or 1870 | ; SHM reset. The default "" disables file based caching. 1871 | ;opcache.file_cache= 1872 | 1873 | ; Enables or disables opcode caching in shared memory. 1874 | ;opcache.file_cache_only=0 1875 | 1876 | ; Enables or disables checksum validation when script loaded from file cache. 1877 | ;opcache.file_cache_consistency_checks=1 1878 | 1879 | ; Implies opcache.file_cache_only=1 for a certain process that failed to 1880 | ; reattach to the shared memory (for Windows only). Explicitly enabled file 1881 | ; cache is required. 1882 | ;opcache.file_cache_fallback=1 1883 | 1884 | ; Enables or disables copying of PHP code (text segment) into HUGE PAGES. 1885 | ; This should improve performance, but requires appropriate OS configuration. 1886 | ;opcache.huge_code_pages=0 1887 | 1888 | ; Validate cached file permissions. 1889 | ;opcache.validate_permission=0 1890 | 1891 | ; Prevent name collisions in chroot'ed environment. 1892 | ;opcache.validate_root=0 1893 | 1894 | ; If specified, it produces opcode dumps for debugging different stages of 1895 | ; optimizations. 1896 | ;opcache.opt_debug_level=0 1897 | 1898 | [curl] 1899 | ; A default value for the CURLOPT_CAINFO option. This is required to be an 1900 | ; absolute path. 1901 | ;curl.cainfo = 1902 | 1903 | [openssl] 1904 | ; The location of a Certificate Authority (CA) file on the local filesystem 1905 | ; to use when verifying the identity of SSL/TLS peers. Most users should 1906 | ; not specify a value for this directive as PHP will attempt to use the 1907 | ; OS-managed cert stores in its absence. If specified, this value may still 1908 | ; be overridden on a per-stream basis via the "cafile" SSL stream context 1909 | ; option. 1910 | ;openssl.cafile= 1911 | 1912 | ; If openssl.cafile is not specified or if the CA file is not found, the 1913 | ; directory pointed to by openssl.capath is searched for a suitable 1914 | ; certificate. This value must be a correctly hashed certificate directory. 1915 | ; Most users should not specify a value for this directive as PHP will 1916 | ; attempt to use the OS-managed cert stores in its absence. If specified, 1917 | ; this value may still be overridden on a per-stream basis via the "capath" 1918 | ; SSL stream context option. 1919 | ;openssl.capath= 1920 | 1921 | ; Local Variables: 1922 | ; tab-width: 4 1923 | ; End: --------------------------------------------------------------------------------