Nginx+PHP7.3.9 Docker镜像制作

最近因项目需要制作了多个版本的php docker镜像,制作过程可谓是一波三折,因基于yum的方式安装php的方式在安装扩展插件时很不方便,不容易找到插件对应的yum源,所以PHP在docker镜像中的安装改成了源码编译安装的方式。

主要有一下几个步骤:

  1. 编译php所需yum包安装,注意epel-release 
    和libmcryt-devel 需要分成2条yum命令按照epel-release在前的命令安装,不然会报找不到安装包错误
yum -y install patch openssl openssl-devel pcre pcre-devel gd gd-devel \
gcc gcc-c++ make automake autoconf install libxml2 libxml2-devel \
curl-devel \
libjpeg-devel \
unzip \
mysql-server mysql-devel && \
yum -y install epel-release && \
yum -y install libmcrypt-devel && \
yum -y install libmhash-devel && \
yum -y install postgresql-devel && \
yum -y install bzip2-devel && \
yum -y install bzip2

 

  1. php源码包下载

    php源码包有两个地方提供,http://www.php.net/releases  , https://github.com/php/php-src/
    建议从http://www.php.net/releases 选择需要的版本,github上的源码没有configure文件,无法直接进行编译;
    这里选择了 https://www.php.net/distributions/php-7.3.9.tar.gz
    这个版本
     
  2. 链接库路径设置
    ln -s /usr/lib64/mysql/libmysqlclient.so.16 /usr/lib/libmysqlclient.so && \
    ln -s /usr/lib64/libjpeg.so /usr/lib/libjpeg.so && \
    ln -s /usr/lib64/libpng.so /usr/lib/libpng.so && \
    ln -s /usr/lib64/mysql /usr/lib/mysql

     

  3. cmake安装及设置 编译 php7.3.9 因插件libzip需要 使用cmake3编译,否则版本不支持,此处libzip原始的编译脚本,libzip源码包路径 https://libzip.org/download/libzip-1.5.2.tar.gz
    yum install -y cmake3 && \
    ln -s /usr/bin/cmake3 /usr/bin/cmake && \
    tar -zxvf libzip-1.5.1.tar.gz && \
    cd libzip-1.5.1 && \
    mkdir build && \
    cd build && \
    cmake .. && \
    make && make install

     

  4. 源码编译开关配置及编译命令
    #环境变量
    export ver=php-7.3.9 && \
    export folder=php739 && \

    PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig \ ./configure --prefix=/usr/local/${folder} --enable-zip --enable-fpm \ --with-fpm-user=apache \ --with-fpm-group=apache \ --with-iconv \ --with-mhash \ --enable-zip \ --with-bz2 \ --enable-gd-native-ttf --with-config-file-path=/usr/local/${folder}/etc --with-config-file-scan-dir=/usr/local/${folder}/etc/php.d \ --with-curl --with-libxml-dir=/usr/lib64 --with-gd --with-jpeg-dir --with-freetype-dir=/usr/lib64 --with-png-dir --with-mcrypt \ --with-mhash --enable-mbstring --with-kerberos --with-gettext --enable-bcmath --with-mysql --with-mysqli --with-sqlite \ --enable-pdo --with-pdo-mysql --with-openssl --enable-ftp --with-pear --with-zlib --enable-inline-optimization \ --with-pdo-pgsql --with-pgsql \ --enable-calendar --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --disable-debug && \ make && make instal

     

  5. 开启服务,service start nginx && /usr/local/${folder}/sbin/php-fpm

Dockerfile 参考

FROM lipingsg/centos-ssh:6.10

MAINTAINER tlping@163.com

ENV ver=php-7.3.9
ENV folder=php739

RUN bash -c "yum -y install patch openssl openssl-devel pcre pcre-devel gd gd-devel \
gcc gcc-c++ make automake autoconf install libxml2 libxml2-devel \
curl-devel \
libjpeg-devel \
unzip \
mysql-server mysql-devel && \
yum -y install epel-release && \
yum -y install libmcrypt-devel && \
yum -y install libmhash-devel && \
yum -y install postgresql-devel && \
yum -y install bzip2-devel && \
yum -y install bzip2"




RUN bash -c "ln -s /usr/lib64/mysql/libmysqlclient.so.16 /usr/lib/libmysqlclient.so && \
ln -s /usr/lib64/libjpeg.so /usr/lib/libjpeg.so && \
ln -s /usr/lib64/libpng.so /usr/lib/libpng.so && \
ln -s /usr/lib64/mysql /usr/lib/mysql"


#RUN bash -c 'mkdir -p /var/www/html/public'

#RUN bash -c "mkdir /home/files"
COPY ./docker/*.gz /home/files/
#COPY ./docker/*.zip /home/files/


WORKDIR /home/files

#ENV ver=php-5.3.29
#ENV folder=php5329

RUN bash -c "tar -zxvf ${ver}.tar.gz"


WORKDIR /home/files/$ver
#RUN bash -c "/usr/bin/phpize"
RUN bash -c "yum remove libzip"

#RUN bash -c "yum install -y wget"

WORKDIR /home/files
RUN bash -c "yum install -y cmake3 && \
ln -s /usr/bin/cmake3 /usr/bin/cmake && \
tar -zxvf libzip-1.5.1.tar.gz && \
cd libzip-1.5.1 && \
mkdir build && \
cd build && \
cmake .. && \
make && make install"



WORKDIR /home/files/$ver

RUN bash -c "PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig \
./configure --prefix=/usr/local/${folder}  --enable-zip --enable-fpm \
--with-fpm-user=apache \
--with-fpm-group=apache \
--with-iconv \
--with-mhash \
--enable-zip \
--with-bz2 \
--enable-gd-native-ttf --with-config-file-path=/usr/local/${folder}/etc --with-config-file-scan-dir=/usr/local/${folder}/etc/php.d \
--with-curl --with-libxml-dir=/usr/lib64 --with-gd --with-jpeg-dir --with-freetype-dir=/usr/lib64 --with-png-dir --with-mcrypt \
--with-mhash --enable-mbstring --with-kerberos --with-gettext --enable-bcmath --with-mysql --with-mysqli --with-sqlite \
--enable-pdo --with-pdo-mysql --with-openssl --enable-ftp --with-pear --with-zlib --enable-inline-optimization \
--with-pdo-pgsql --with-pgsql \
--enable-calendar --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --disable-debug && \
make && make install"


RUN adduser apache

#need php5.4above
RUN bash -c "yum install -y ImageMagick && \
yum install -y ImageMagick-devel && \
yum -y install php-devel"

#RUN bash -c '/usr/local/$folder/bin/phpize'
#RUN bash -c './configure --with-php-config=/usr/local/$folder/bin/php-config && \
# make && make install'
 

#安装redis插件
RUN bash -c 'yum install -y php-redis' 
 
RUN bash -c "rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm && \
yum install -y nginx.x86_64"

RUN bash -c 'mkdir -p /etc/nginx/logs'


# use project folder as the docker build context
#copy full project to html dir
ADD ./ /var/www/html/
#copy test file to public
ADD ./docker/*.php /var/www/html/public/test/


EXPOSE 80
 
COPY ./docker/my-init.sh /usr/bin/my-init.sh
RUN chmod +x /usr/bin/my-init.sh



RUN bash -c 'export folder'

ADD ./docker/php-fpm.conf /usr/local/${folder}/etc/php-fpm.conf 
ADD ./docker/php.ini /etc/php.ini


ADD ./docker/nginx.conf /etc/nginx/nginx.conf



ENTRYPOINT ["my-init.sh"]

  my-init.sh  用于在容器启动时启动自动启动nginx和php-fpm服务,参考

#!/bin/sh
echo 'start nginx message now'
service nginx start
echo 'start php'
/usr/local/${folder}/sbin/php-fpm 
echo 'finish php-fpm'
read 

  nginx.conf 用于定制nginx的行为

  1 user  nginx;
  2 worker_processes  1;
  3 
  4 error_log  /var/log/nginx/error.log warn;
  5 pid        /var/run/nginx.pid;
  6 
  7 
  8 events {
  9     worker_connections  1024;
 10 }
 11 
 12 
 13 http {
 14     include       /etc/nginx/mime.types;
 15     default_type  application/octet-stream;
 16 
 17     log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
 18                       '$status $body_bytes_sent "$http_referer" '
 19                       '"$http_user_agent" "$http_x_forwarded_for"';
 20 
 21     access_log  /var/log/nginx/access.log  main;
 22 
 23     sendfile        on;
 24     #tcp_nopush     on;
 25 
 26     keepalive_timeout  65;
 27 
 28     #gzip  on;
 29 
 30 
 31 
 32      server {
 33         listen       80;
 34         #server_name  localhost;
 35 
 36         #charset koi8-r;
 37 
 38         #access_log  logs/host.access.log  main;
 39          set $root    "/var/www/html/public";
 40          root $root;
 41          location ~ .*\.(gif|jpg|jpeg|bmp|png|ico|txt|js|css|woff|woff2)$
 42 
 43         {
 44             root $root;
 45         }
 46 
 47         location / {
 48             root    $root;
 49             index  index.html index.htm index.php l.php;
 50 #           autoindex  off;
 51 
 52 
 53             #try_files  $uri  /index.php$uri;
 54             #try_files  $request_uri  /index.php$request_uri;
 55             if (!-e $request_filename) {
 56                     rewrite  ^(.*)$  /index.php?s=/$1  last;
 57                     break;
 58              }
 59                 #结束
 60 
 61         }
 62 
 63         error_log    /var/www/html/err.txt    error;
 64         #error_page  404              /404.html;
 65 
 66         # redirect server error pages to the static page /50x.html
 67         #
 68         error_page   500 502 503 504  /50x.html;
 69         location = /50x.html {
 70             root  "/var/www/html";
 71         }
 72 
 73         # proxy the PHP scripts to Apache listening on 127.0.0.1:80
 74         #
 75         #location ~ \.php$ {
 76         #    proxy_pass   http://127.0.0.1;
 77         #}
 78 
 79         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
 80         #
 81         location ~ \.php(.*)$  {
 82             root    $root;
 83             fastcgi_pass   127.0.0.1:9000;
 84             fastcgi_index  index.php;
 85             
 86             fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;
 87             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
 88             fastcgi_param  PATH_INFO  $fastcgi_path_info;
 89             fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
 90             include        fastcgi_params;
 91 
 92 
 93         
 94         }
 95 
 96 
 97 
 98 
 99         # deny access to .htaccess files, if Apache's document root
100         # concurs with nginx's one
101         #
102         #location ~ /\.ht {
103         #    deny  all;
104         #}
105     }
106 #this statement must be put as the last line
107 include /etc/nginx/conf.d/*.conf;
108 
109 }

php.ini 最后增加载入扩展的配置,如果不需要也可以不COPY

   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 (C:\windows or C:\winnt)
  19 ; See the PHP docs for more specific information.
  20 ; http://www.php.net/manual/en/configuration.file.php
  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://www.php.net/manual/en/ini.sections.php
  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's
  82 ; much more verbose when it comes to errors. We recommending 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 2 files are provided, by RPM, in /usr/share/doc/php-common-*/
  87 ; File used by RPM (the /etc/php.ini) is mainly the php.ini-production
  88 
  89 ;;;;;;;;;;;;;;;;;;;
  90 ; Quick Reference ;
  91 ;;;;;;;;;;;;;;;;;;;
  92 ; The following are all the settings which are different in either the production
  93 ; or development versions of the INIs with respect to PHP's default behavior.
  94 ; Please see the actual settings later in the document for more details as to why
  95 ; we recommend these changes in PHP's behavior.
  96 
  97 ; allow_call_time_pass_reference
  98 ;   Default Value: On
  99 ;   Development Value: Off
 100 ;   Production Value: Off
 101 
 102 ; display_errors
 103 ;   Default Value: On
 104 ;   Development Value: On
 105 ;   Production Value: Off
 106 
 107 ; display_startup_errors
 108 ;   Default Value: Off
 109 ;   Development Value: On
 110 ;   Production Value: Off
 111 
 112 ; error_reporting
 113 ;   Default Value: E_ALL & ~E_NOTICE
 114 ;   Development Value: E_ALL | E_STRICT
 115 ;   Production Value: E_ALL & ~E_DEPRECATED
 116 
 117 ; html_errors
 118 ;   Default Value: On
 119 ;   Development Value: On
 120 ;   Production value: Off
 121 
 122 ; log_errors
 123 ;   Default Value: Off
 124 ;   Development Value: On
 125 ;   Production Value: On
 126 
 127 ; magic_quotes_gpc
 128 ;   Default Value: On
 129 ;   Development Value: Off
 130 ;   Production Value: Off
 131 
 132 ; max_input_time
 133 ;   Default Value: -1 (Unlimited)
 134 ;   Development Value: 60 (60 seconds)
 135 ;   Production Value: 60 (60 seconds)
 136 
 137 ; output_buffering
 138 ;   Default Value: Off
 139 ;   Development Value: 4096
 140 ;   Production Value: 4096
 141 
 142 ; register_argc_argv
 143 ;   Default Value: On
 144 ;   Development Value: Off
 145 ;   Production Value: Off
 146 
 147 ; register_long_arrays
 148 ;   Default Value: On
 149 ;   Development Value: Off
 150 ;   Production Value: Off
 151 
 152 ; request_order
 153 ;   Default Value: None
 154 ;   Development Value: "GP"
 155 ;   Production Value: "GP"
 156 
 157 ; session.bug_compat_42
 158 ;   Default Value: On
 159 ;   Development Value: On
 160 ;   Production Value: Off
 161 
 162 ; session.bug_compat_warn
 163 ;   Default Value: On
 164 ;   Development Value: On
 165 ;   Production Value: Off
 166 
 167 ; session.gc_divisor
 168 ;   Default Value: 100
 169 ;   Development Value: 1000
 170 ;   Production Value: 1000
 171 
 172 ; session.hash_bits_per_character
 173 ;   Default Value: 4
 174 ;   Development Value: 5
 175 ;   Production Value: 5
 176 
 177 ; short_open_tag
 178 ;   Default Value: On
 179 ;   Development Value: Off
 180 ;   Production Value: Off
 181 
 182 ; track_errors
 183 ;   Default Value: Off
 184 ;   Development Value: On
 185 ;   Production Value: Off
 186 
 187 ; url_rewriter.tags
 188 ;   Default Value: "a=href,area=href,frame=src,form=,fieldset="
 189 ;   Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
 190 ;   Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
 191 
 192 ; variables_order
 193 ;   Default Value: "EGPCS"
 194 ;   Development Value: "GPCS"
 195 ;   Production Value: "GPCS"
 196 
 197 ;;;;;;;;;;;;;;;;;;;;
 198 ; php.ini Options  ;
 199 ;;;;;;;;;;;;;;;;;;;;
 200 ; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini"
 201 ;user_ini.filename = ".user.ini"
 202 
 203 ; To disable this feature set this option to empty value
 204 ;user_ini.filename =
 205 
 206 ; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes)
 207 ;user_ini.cache_ttl = 300
 208 
 209 ;;;;;;;;;;;;;;;;;;;;
 210 ; Language Options ;
 211 ;;;;;;;;;;;;;;;;;;;;
 212 
 213 ; Enable the PHP scripting language engine under Apache.
 214 ; http://www.php.net/manual/en/apache.configuration.php#ini.engine
 215 engine = On
 216 
 217 ; This directive determines whether or not PHP will recognize code between
 218 ; <? and ?> tags as PHP source which should be processed as such. It's been
 219 ; recommended for several years that you not use the short tag "short cut" and
 220 ; instead to use the full <?php and ?> tag combination. With the wide spread use
 221 ; of XML and use of these tags by other languages, the server can become easily
 222 ; confused and end up parsing the wrong code in the wrong context. But because
 223 ; this short cut has been a feature for such a long time, it's currently still
 224 ; supported for backwards compatibility, but we recommend you don't use them.
 225 ; Default Value: On
 226 ; Development Value: Off
 227 ; Production Value: Off
 228 ; http://www.php.net/manual/en/ini.core.php#ini.short-open-tag
 229 short_open_tag = Off
 230 
 231 ; Allow ASP-style <% %> tags.
 232 ; http://www.php.net/manual/en/ini.core.php#ini.asp-tags
 233 asp_tags = Off
 234 
 235 ; The number of significant digits displayed in floating point numbers.
 236 ; http://www.php.net/manual/en/ini.core.php#ini.precision
 237 precision = 14
 238 
 239 ; Enforce year 2000 compliance (will cause problems with non-compliant browsers)
 240 ; http://www.php.net/manual/en/ini.core.php#ini.y2k-compliance
 241 y2k_compliance = On
 242 
 243 ; Output buffering is a mechanism for controlling how much output data
 244 ; (excluding headers and cookies) PHP should keep internally before pushing that
 245 ; data to the client. If your application's output exceeds this setting, PHP
 246 ; will send that data in chunks of roughly the size you specify.
 247 ; Turning on this setting and managing its maximum buffer size can yield some
 248 ; interesting side-effects depending on your application and web server.
 249 ; You may be able to send headers and cookies after you've already sent output
 250 ; through print or echo. You also may see performance benefits if your server is
 251 ; emitting less packets due to buffered output versus PHP streaming the output
 252 ; as it gets it. On production servers, 4096 bytes is a good setting for performance
 253 ; reasons.
 254 ; Note: Output buffering can also be controlled via Output Buffering Control
 255 ;   functions.
 256 ; Possible Values:
 257 ;   On = Enabled and buffer is unlimited. (Use with caution)
 258 ;   Off = Disabled
 259 ;   Integer = Enables the buffer and sets its maximum size in bytes.
 260 ; Default Value: Off
 261 ; Development Value: 4096
 262 ; Production Value: 4096
 263 ; http://www.php.net/manual/en/outcontrol.configuration.php#ini.output-buffering
 264 output_buffering = 4096
 265 
 266 ; You can redirect all of the output of your scripts to a function.  For
 267 ; example, if you set output_handler to "mb_output_handler", character
 268 ; encoding will be transparently converted to the specified encoding.
 269 ; Setting any output handler automatically turns on output buffering.
 270 ; Note: People who wrote portable scripts should not depend on this ini
 271 ;   directive. Instead, explicitly set the output handler using ob_start().
 272 ;   Using this ini directive may cause problems unless you know what script
 273 ;   is doing.
 274 ; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler"
 275 ;   and you cannot use both "ob_gzhandler" and "zlib.output_compression".
 276 ; Note: output_handler must be empty if this is set 'On' !!!!
 277 ;   Instead you must use zlib.output_handler.
 278 ; http://www.php.net/manual/en/outcontrol.configuration.php#ini.output-handler
 279 ;output_handler =
 280 
 281 ; Transparent output compression using the zlib library
 282 ; Valid values for this option are 'off', 'on', or a specific buffer size
 283 ; to be used for compression (default is 4KB)
 284 ; Note: Resulting chunk size may vary due to nature of compression. PHP
 285 ;   outputs chunks that are few hundreds bytes each as a result of
 286 ;   compression. If you prefer a larger chunk size for better
 287 ;   performance, enable output_buffering in addition.
 288 ; Note: You need to use zlib.output_handler instead of the standard
 289 ;   output_handler, or otherwise the output will be corrupted.
 290 ; http://www.php.net/manual/en/zlib.configuration.php#ini.zlib.output-compression
 291 zlib.output_compression = Off
 292 
 293 ; http://www.php.net/manual/en/zlib.configuration.php#ini.zlib.output-compression-level
 294 ;zlib.output_compression_level = -1
 295 
 296 ; You cannot specify additional output handlers if zlib.output_compression
 297 ; is activated here. This setting does the same as output_handler but in
 298 ; a different order.
 299 ; http://www.php.net/manual/en/zlib.configuration.php#ini.zlib.output-handler
 300 ;zlib.output_handler =
 301 
 302 ; Implicit flush tells PHP to tell the output layer to flush itself
 303 ; automatically after every output block.  This is equivalent to calling the
 304 ; PHP function flush() after each and every call to print() or echo() and each
 305 ; and every HTML block.  Turning this option on has serious performance
 306 ; implications and is generally recommended for debugging purposes only.
 307 ; http://www.php.net/manual/en/outcontrol.configuration.php#ini.implicit-flush
 308 implicit_flush = Off
 309 
 310 ; The unserialize callback function will be called (with the undefined class'
 311 ; name as parameter), if the unserializer finds an undefined class
 312 ; which should be instantiated. A warning appears if the specified function is
 313 ; not defined, or if the function doesn't include/implement the missing class.
 314 ; So only set this entry, if you really want to implement such a
 315 ; callback-function.
 316 unserialize_callback_func =
 317 
 318 ; When floats & doubles are serialized store serialize_precision significant
 319 ; digits after the floating point. The default value ensures that when floats
 320 ; are decoded with unserialize, the data will remain the same.
 321 serialize_precision = 100
 322 
 323 ; This directive allows you to enable and disable warnings which PHP will issue
 324 ; if you pass a value by reference at function call time. Passing values by
 325 ; reference at function call time is a deprecated feature which will be removed
 326 ; from PHP at some point in the near future. The acceptable method for passing a
 327 ; value by reference to a function is by declaring the reference in the functions
 328 ; definition, not at call time. This directive does not disable this feature, it
 329 ; only determines whether PHP will warn you about it or not. These warnings
 330 ; should enabled in development environments only.
 331 ; Default Value: On (Suppress warnings)
 332 ; Development Value: Off (Issue warnings)
 333 ; Production Value: Off (Issue warnings)
 334 ; http://www.php.net/manual/en/ini.core.php#ini.allow-call-time-pass-reference
 335 allow_call_time_pass_reference = Off
 336 
 337 ; Safe Mode
 338 ; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode
 339 safe_mode = Off
 340 
 341 ; By default, Safe Mode does a UID compare check when
 342 ; opening files. If you want to relax this to a GID compare,
 343 ; then turn on safe_mode_gid.
 344 ; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode-gid
 345 safe_mode_gid = Off
 346 
 347 ; When safe_mode is on, UID/GID checks are bypassed when
 348 ; including files from this directory and its subdirectories.
 349 ; (directory must also be in include_path or full path must
 350 ; be used when including)
 351 ; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode-include-dir
 352 safe_mode_include_dir =
 353 
 354 ; When safe_mode is on, only executables located in the safe_mode_exec_dir
 355 ; will be allowed to be executed via the exec family of functions.
 356 ; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode-exec-dir
 357 safe_mode_exec_dir =
 358 
 359 ; Setting certain environment variables may be a potential security breach.
 360 ; This directive contains a comma-delimited list of prefixes.  In Safe Mode,
 361 ; the user may only alter environment variables whose names begin with the
 362 ; prefixes supplied here.  By default, users will only be able to set
 363 ; environment variables that begin with PHP_ (e.g. PHP_FOO=BAR).
 364 ; Note:  If this directive is empty, PHP will let the user modify ANY
 365 ;   environment variable!
 366 ; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode-allowed-env-vars
 367 safe_mode_allowed_env_vars = PHP_
 368 
 369 ; This directive contains a comma-delimited list of environment variables that
 370 ; the end user won't be able to change using putenv().  These variables will be
 371 ; protected even if safe_mode_allowed_env_vars is set to allow to change them.
 372 ; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode-protected-env-vars
 373 safe_mode_protected_env_vars = LD_LIBRARY_PATH
 374 
 375 ; open_basedir, if set, limits all file operations to the defined directory
 376 ; and below.  This directive makes most sense if used in a per-directory
 377 ; or per-virtualhost web server configuration file. This directive is
 378 ; *NOT* affected by whether Safe Mode is turned On or Off.
 379 ; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.open-basedir
 380 ;open_basedir =
 381 
 382 ; This directive allows you to disable certain functions for security reasons.
 383 ; It receives a comma-delimited list of function names. This directive is
 384 ; *NOT* affected by whether Safe Mode is turned On or Off.
 385 ; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.disable-functions
 386 disable_functions =
 387 
 388 ; This directive allows you to disable certain classes for security reasons.
 389 ; It receives a comma-delimited list of class names. This directive is
 390 ; *NOT* affected by whether Safe Mode is turned On or Off.
 391 ; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.disable-classes
 392 disable_classes =
 393 
 394 ; Colors for Syntax Highlighting mode.  Anything that's acceptable in
 395 ; <span style="color: ???????"> would work.
 396 ; http://www.php.net/manual/en/misc.configuration.php#ini.syntax-highlighting
 397 ;highlight.string  = #DD0000
 398 ;highlight.comment = #FF9900
 399 ;highlight.keyword = #007700
 400 ;highlight.bg      = #FFFFFF
 401 ;highlight.default = #0000BB
 402 ;highlight.html    = #000000
 403 
 404 ; If enabled, the request will be allowed to complete even if the user aborts
 405 ; the request. Consider enabling it if executing long requests, which may end up
 406 ; being interrupted by the user or a browser timing out. PHP's default behavior
 407 ; is to disable this feature.
 408 ; http://www.php.net/manual/en/misc.configuration.php#ini.ignore-user-abort
 409 ;ignore_user_abort = On
 410 
 411 ; Determines the size of the realpath cache to be used by PHP. This value should
 412 ; be increased on systems where PHP opens many files to reflect the quantity of
 413 ; the file operations performed.
 414 ; http://www.php.net/manual/en/ini.core.php#ini.realpath-cache-size
 415 ;realpath_cache_size = 16k
 416 
 417 ; Duration of time, in seconds for which to cache realpath information for a given
 418 ; file or directory. For systems with rarely changing files, consider increasing this
 419 ; value.
 420 ; http://www.php.net/manual/en/ini.core.php#ini.realpath-cache-ttl
 421 ;realpath_cache_ttl = 120
 422 
 423 ;;;;;;;;;;;;;;;;;
 424 ; Miscellaneous ;
 425 ;;;;;;;;;;;;;;;;;
 426 
 427 ; Decides whether PHP may expose the fact that it is installed on the server
 428 ; (e.g. by adding its signature to the Web server header).  It is no security
 429 ; threat in any way, but it makes it possible to determine whether you use PHP
 430 ; on your server or not.
 431 ; http://www.php.net/manual/en/ini.core.php#ini.expose-php
 432 expose_php = On
 433 
 434 ;;;;;;;;;;;;;;;;;;;
 435 ; Resource Limits ;
 436 ;;;;;;;;;;;;;;;;;;;
 437 
 438 ; Maximum execution time of each script, in seconds
 439 ; http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time
 440 max_execution_time = 30     
 441 
 442 ; Maximum amount of time each script may spend parsing request data. It's a good
 443 ; idea to limit this time on productions servers in order to eliminate unexpectedly
 444 ; long running scripts. 
 445 ; Default Value: -1 (Unlimited)
 446 ; Development Value: 60 (60 seconds)
 447 ; Production Value: 60 (60 seconds)
 448 ; http://www.php.net/manual/en/info.configuration.php#ini.max-input-time
 449 max_input_time = 60
 450 
 451 ; Maximum input variable nesting level
 452 ; http://www.php.net/manual/en/info.configuration.php#ini.max-input-nesting-level
 453 ;max_input_nesting_level = 64
 454 
 455 ; Maximum amount of memory a script may consume (128MB)
 456 ; http://www.php.net/manual/en/ini.core.php#ini.memory-limit
 457 memory_limit = 128M
 458 
 459 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 460 ; Error handling and logging ;
 461 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 462 
 463 ; This directive informs PHP of which errors, warnings and notices you would like
 464 ; it to take action for. The recommended way of setting values for this
 465 ; directive is through the use of the error level constants and bitwise
 466 ; operators. The error level constants are below here for convenience as well as
 467 ; some common settings and their meanings.
 468 ; By default, PHP is set to take action on all errors, notices and warnings EXCEPT
 469 ; those related to E_NOTICE and E_STRICT, which together cover best practices and
 470 ; recommended coding standards in PHP. For performance reasons, this is the
 471 ; recommend error reporting setting. Your production server shouldn't be wasting
 472 ; resources complaining about best practices and coding standards. That's what
 473 ; development servers and development settings are for.
 474 ; Note: The php.ini-development file has this setting as E_ALL | E_STRICT. This
 475 ; means it pretty much reports everything which is exactly what you want during
 476 ; development and early testing.
 477 ;
 478 ; Error Level Constants:
 479 ; E_ALL             - All errors and warnings (includes E_STRICT as of PHP 6.0.0)
 480 ; E_ERROR           - fatal run-time errors
 481 ; E_RECOVERABLE_ERROR  - almost fatal run-time errors
 482 ; E_WARNING         - run-time warnings (non-fatal errors)
 483 ; E_PARSE           - compile-time parse errors
 484 ; E_NOTICE          - run-time notices (these are warnings which often result
 485 ;                     from a bug in your code, but it's possible that it was
 486 ;                     intentional (e.g., using an uninitialized variable and
 487 ;                     relying on the fact it's automatically initialized to an
 488 ;                     empty string)
 489 ; E_STRICT          - run-time notices, enable to have PHP suggest changes
 490 ;                     to your code which will ensure the best interoperability
 491 ;                     and forward compatibility of your code
 492 ; E_CORE_ERROR      - fatal errors that occur during PHP's initial startup
 493 ; E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's
 494 ;                     initial startup
 495 ; E_COMPILE_ERROR   - fatal compile-time errors
 496 ; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
 497 ; E_USER_ERROR      - user-generated error message
 498 ; E_USER_WARNING    - user-generated warning message
 499 ; E_USER_NOTICE     - user-generated notice message
 500 ; E_DEPRECATED      - warn about code that will not work in future versions
 501 ;                     of PHP
 502 ; E_USER_DEPRECATED - user-generated deprecation warnings
 503 ;
 504 ; Common Values:
 505 ;   E_ALL & ~E_NOTICE  (Show all errors, except for notices and coding standards warnings.)
 506 ;   E_ALL & ~E_NOTICE | E_STRICT  (Show all errors, except for notices)
 507 ;   E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR  (Show only errors)
 508 ;   E_ALL | E_STRICT  (Show all errors, warnings and notices including coding standards.)
 509 ; Default Value: E_ALL & ~E_NOTICE
 510 ; Development Value: E_ALL | E_STRICT
 511 ; Production Value: E_ALL & ~E_DEPRECATED
 512 ; http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting
 513 error_reporting = E_ALL & ~E_DEPRECATED
 514 
 515 ; This directive controls whether or not and where PHP will output errors,
 516 ; notices and warnings too. Error output is very useful during development, but
 517 ; it could be very dangerous in production environments. Depending on the code
 518 ; which is triggering the error, sensitive information could potentially leak
 519 ; out of your application such as database usernames and passwords or worse.
 520 ; It's recommended that errors be logged on production servers rather than
 521 ; having the errors sent to STDOUT.
 522 ; Possible Values:
 523 ;   Off = Do not display any errors 
 524 ;   stderr = Display errors to STDERR (affects only CGI/CLI binaries!)   
 525 ;   On or stdout = Display errors to STDOUT
 526 ; Default Value: On
 527 ; Development Value: On
 528 ; Production Value: Off
 529 ; http://www.php.net/manual/en/errorfunc.configuration.php#ini.display-errors
 530 display_errors = Off
 531 
 532 ; The display of errors which occur during PHP's startup sequence are handled
 533 ; separately from display_errors. PHP's default behavior is to suppress those
 534 ; errors from clients. Turning the display of startup errors on can be useful in
 535 ; debugging configuration problems. But, it's strongly recommended that you
 536 ; leave this setting off on production servers.
 537 ; Default Value: Off
 538 ; Development Value: On
 539 ; Production Value: Off
 540 ; http://www.php.net/manual/en/errorfunc.configuration.php#ini.display-startup-errors
 541 display_startup_errors = Off
 542 
 543 ; Besides displaying errors, PHP can also log errors to locations such as a
 544 ; server-specific log, STDERR, or a location specified by the error_log
 545 ; directive found below. While errors should not be displayed on productions
 546 ; servers they should still be monitored and logging is a great way to do that.
 547 ; Default Value: Off
 548 ; Development Value: On
 549 ; Production Value: On
 550 ; http://www.php.net/manual/en/errorfunc.configuration.php#ini.log-errors
 551 log_errors = On
 552 
 553 ; Set maximum length of log_errors. In error_log information about the source is
 554 ; added. The default is 1024 and 0 allows to not apply any maximum length at all.
 555 ; http://www.php.net/manual/en/errorfunc.configuration.php#ini.log-errors-max-len
 556 log_errors_max_len = 1024
 557 
 558 ; Do not log repeated messages. Repeated errors must occur in same file on same
 559 ; line unless ignore_repeated_source is set true.
 560 ; http://www.php.net/manual/en/errorfunc.configuration.php#ini.ignore-repeated-errors
 561 ignore_repeated_errors = Off
 562 
 563 ; Ignore source of message when ignoring repeated messages. When this setting
 564 ; is On you will not log errors with repeated messages from different files or
 565 ; source lines.
 566 ; http://www.php.net/manual/en/errorfunc.configuration.php#ini.ignore-repeated-source
 567 ignore_repeated_source = Off
 568 
 569 ; If this parameter is set to Off, then memory leaks will not be shown (on
 570 ; stdout or in the log). This has only effect in a debug compile, and if
 571 ; error reporting includes E_WARNING in the allowed list
 572 ; http://www.php.net/manual/en/errorfunc.configuration.php#ini.report-memleaks
 573 report_memleaks = On
 574 
 575 ; This setting is on by default.
 576 ;report_zend_debug = 0
 577 
 578 ; Store the last error/warning message in $php_errormsg (boolean). Setting this value
 579 ; to On can assist in debugging and is appropriate for development servers. It should
 580 ; however be disabled on production servers.
 581 ; Default Value: Off
 582 ; Development Value: On
 583 ; Production Value: Off
 584 ; http://www.php.net/manual/en/errorfunc.configuration.php#ini.track-errors
 585 track_errors = Off
 586 
 587 ; Turn off normal error reporting and emit XML-RPC error XML
 588 ; http://www.php.net/manual/en/errorfunc.configuration.php#ini.xmlrpc-errors
 589 ;xmlrpc_errors = 0
 590 
 591 ; An XML-RPC faultCode
 592 ;xmlrpc_error_number = 0
 593 
 594 ; When PHP displays or logs an error, it has the capability of inserting html
 595 ; links to documentation related to that error. This directive controls whether
 596 ; those HTML links appear in error messages or not. For performance and security
 597 ; reasons, it's recommended you disable this on production servers.
 598 ; Default Value: On
 599 ; Development Value: On
 600 ; Production value: Off
 601 ; http://www.php.net/manual/en/errorfunc.configuration.php#ini.html-errors
 602 html_errors = Off
 603 
 604 ; If html_errors is set On PHP produces clickable error messages that direct
 605 ; to a page describing the error or function causing the error in detail.
 606 ; You can download a copy of the PHP manual from http://www.php.net/docs.php
 607 ; and change docref_root to the base URL of your local copy including the
 608 ; leading '/'. You must also specify the file extension being used including
 609 ; the dot. PHP's default behavior is to leave these settings empty.
 610 ; Note: Never use this feature for production boxes.
 611 ; http://www.php.net/manual/en/errorfunc.configuration.php#ini.docref-root
 612 ; Examples
 613 ;docref_root = "/phpmanual/"
 614 
 615 ; http://www.php.net/manual/en/errorfunc.configuration.php#ini.docref-ext
 616 ;docref_ext = .html
 617 
 618 ; String to output before an error message. PHP's default behavior is to leave
 619 ; this setting blank.
 620 ; http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-prepend-string
 621 ; Example:
 622 ;error_prepend_string = "<font color=#ff0000>"
 623 
 624 ; String to output after an error message. PHP's default behavior is to leave
 625 ; this setting blank.
 626 ; http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-append-string
 627 ; Example:
 628 ;error_append_string = "</font>"
 629 
 630 ; Log errors to specified file. PHP's default behavior is to leave this value
 631 ; empty.
 632 ; http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-log
 633 ; Example:
 634 ;error_log = php_errors.log
 635 ; Log errors to syslog (Event Log on NT, not valid in Windows 95).
 636 ;error_log = syslog
 637 
 638 ;;;;;;;;;;;;;;;;;
 639 ; Data Handling ;
 640 ;;;;;;;;;;;;;;;;;
 641 
 642 ; Note - track_vars is ALWAYS enabled as of PHP 4.0.3
 643 
 644 ; The separator used in PHP generated URLs to separate arguments.
 645 ; PHP's default setting is "&".
 646 ; http://www.php.net/manual/en/ini.core.php#ini.arg-separator.output
 647 ; Example:
 648 ;arg_separator.output = "&amp;"
 649 
 650 ; List of separator(s) used by PHP to parse input URLs into variables.
 651 ; PHP's default setting is "&".
 652 ; NOTE: Every character in this directive is considered as separator!
 653 ; http://www.php.net/manual/en/ini.core.php#ini.arg-separator.input
 654 ; Example:
 655 ;arg_separator.input = ";&"
 656 
 657 ; This directive determines which super global arrays are registered when PHP
 658 ; starts up. If the register_globals directive is enabled, it also determines
 659 ; what order variables are populated into the global space. G,P,C,E & S are
 660 ; abbreviations for the following respective super globals: GET, POST, COOKIE,
 661 ; ENV and SERVER. There is a performance penalty paid for the registration of
 662 ; these arrays and because ENV is not as commonly used as the others, ENV is
 663 ; is not recommended on productions servers. You can still get access to
 664 ; the environment variables through getenv() should you need to.
 665 ; Default Value: "EGPCS"
 666 ; Development Value: "GPCS"
 667 ; Production Value: "GPCS";
 668 ; http://www.php.net/manual/en/ini.core.php#ini.variables-order
 669 variables_order = "GPCS"
 670 
 671 ; This directive determines which super global data (G,P,C,E & S) should
 672 ; be registered into the super global array REQUEST. If so, it also determines
 673 ; the order in which that data is registered. The values for this directive are
 674 ; specified in the same manner as the variables_order directive, EXCEPT one.
 675 ; Leaving this value empty will cause PHP to use the value set in the 
 676 ; variables_order directive. It does not mean it will leave the super globals
 677 ; array REQUEST empty.
 678 ; Default Value: None
 679 ; Development Value: "GP"
 680 ; Production Value: "GP"
 681 ; http://www.php.net/manual/en/ini.core.php#ini.request-order
 682 request_order = "GP"
 683 
 684 ; Whether or not to register the EGPCS variables as global variables.  You may
 685 ; want to turn this off if you don't want to clutter your scripts' global scope
 686 ; with user data.  This makes most sense when coupled with track_vars - in which
 687 ; case you can access all of the GPC variables through the $HTTP_*_VARS[],
 688 ; variables.
 689 ; You should do your best to write your scripts so that they do not require
 690 ; register_globals to be on;  Using form variables as globals can easily lead
 691 ; to possible security problems, if the code is not very well thought of.
 692 ; http://www.php.net/manual/en/ini.core.php#ini.register-globals
 693 register_globals = Off
 694 
 695 ; Determines whether the deprecated long $HTTP_*_VARS type predefined variables
 696 ; are registered by PHP or not. As they are deprecated, we obviously don't
 697 ; recommend you use them. They are on by default for compatibility reasons but
 698 ; they are not recommended on production servers.
 699 ; Default Value: On
 700 ; Development Value: Off
 701 ; Production Value: Off
 702 ; http://www.php.net/manual/en/ini.core.php#ini.register-long-arrays
 703 register_long_arrays = Off
 704 
 705 ; This directive determines whether PHP registers $argv & $argc each time it
 706 ; runs. $argv contains an array of all the arguments passed to PHP when a script
 707 ; is invoked. $argc contains an integer representing the number of arguments
 708 ; that were passed when the script was invoked. These arrays are extremely
 709 ; useful when running scripts from the command line. When this directive is
 710 ; enabled, registering these variables consumes CPU cycles and memory each time
 711 ; a script is executed. For performance reasons, this feature should be disabled
 712 ; on production servers.
 713 ; Default Value: On
 714 ; Development Value: Off
 715 ; Production Value: Off
 716 ; http://www.php.net/manual/en/ini.core.php#ini.register-argc-argv
 717 register_argc_argv = Off
 718 
 719 ; When enabled, the SERVER and ENV variables are created when they're first
 720 ; used (Just In Time) instead of when the script starts. If these variables
 721 ; are not used within a script, having this directive on will result in a
 722 ; performance gain. The PHP directives register_globals, register_long_arrays,
 723 ; and register_argc_argv must be disabled for this directive to have any affect.
 724 ; http://www.php.net/manual/en/ini.core.php#ini.auto-globals-jit
 725 auto_globals_jit = On
 726 
 727 ; Maximum size of POST data that PHP will accept.
 728 ; http://www.php.net/manual/en/ini.core.php#ini.post-max-size
 729 post_max_size = 8M
 730 
 731 ; Magic quotes are a preprocessing feature of PHP where PHP will attempt to
 732 ; escape any character sequences in GET, POST, COOKIE and ENV data which might
 733 ; otherwise corrupt data being placed in resources such as databases before
 734 ; making that data available to you. Because of character encoding issues and
 735 ; non-standard SQL implementations across many databases, it's not currently
 736 ; possible for this feature to be 100% accurate. PHP's default behavior is to
 737 ; enable the feature. We strongly recommend you use the escaping mechanisms
 738 ; designed specifically for the database your using instead of relying on this
 739 ; feature. Also note, this feature has been deprecated as of PHP 5.3.0 and is
 740 ; scheduled for removal in PHP 6.
 741 ; Default Value: On
 742 ; Development Value: Off
 743 ; Production Value: Off
 744 ; http://www.php.net/manual/en/info.configuration.php#ini.magic-quotes-gpc
 745 magic_quotes_gpc = Off
 746 
 747 ; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
 748 ; http://www.php.net/manual/en/info.configuration.php#ini.magic-quotes-runtime
 749 magic_quotes_runtime = Off
 750 
 751 ; Use Sybase-style magic quotes (escape ' with '' instead of \').
 752 ; http://www.php.net/manual/en/sybase.configuration.php#ini.magic-quotes-sybase
 753 magic_quotes_sybase = Off
 754 
 755 ; Automatically add files before PHP document.
 756 ; http://www.php.net/manual/en/ini.core.php#ini.auto-prepend-file
 757 auto_prepend_file =
 758 
 759 ; Automatically add files after PHP document.
 760 ; http://www.php.net/manual/en/ini.core.php#ini.auto-append-file
 761 auto_append_file =
 762 
 763 ; As of 4.0b4, PHP always outputs a character encoding by default in
 764 ; the Content-type: header.  To disable sending of the charset, simply
 765 ; set it to be empty.
 766 ;
 767 ; PHP's built-in default is text/html
 768 ; http://www.php.net/manual/en/ini.core.php#ini.default-mimetype
 769 default_mimetype = "text/html"
 770 
 771 ; PHP's default character set is set to empty.
 772 ; http://www.php.net/manual/en/ini.core.php#ini.default-charset
 773 ;default_charset = "iso-8859-1"
 774 
 775 ; Always populate the $HTTP_RAW_POST_DATA variable. PHP's default behavior is
 776 ; to disable this feature.
 777 ; http://www.php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data
 778 ;always_populate_raw_post_data = On
 779 
 780 ;;;;;;;;;;;;;;;;;;;;;;;;;
 781 ; Paths and Directories ;
 782 ;;;;;;;;;;;;;;;;;;;;;;;;;
 783 
 784 ; UNIX: "/path1:/path2"
 785 ;include_path = ".:/php/includes"
 786 ;
 787 ; Windows: "\path1;\path2"
 788 ;include_path = ".;c:\php\includes"
 789 ;
 790 ; PHP's default setting for include_path is ".;/path/to/php/pear"
 791 ; http://www.php.net/manual/en/ini.core.php#ini.include-path
 792 
 793 ; The root of the PHP pages, used only if nonempty.
 794 ; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
 795 ; if you are running php as a CGI under any web server (other than IIS)
 796 ; see documentation for security issues.  The alternate is to use the
 797 ; cgi.force_redirect configuration below
 798 ; http://www.php.net/manual/en/ini.core.php#ini.doc-root
 799 doc_root =
 800 
 801 ; The directory under which PHP opens the script using /~username used only
 802 ; if nonempty.
 803 ; http://www.php.net/manual/en/ini.core.php#ini.user-dir
 804 user_dir =
 805 
 806 ; Directory in which the loadable extensions (modules) reside.
 807 ; http://www.php.net/manual/en/ini.core.php#ini.extension-dir
 808 ; extension_dir = "./"
 809 
 810 ; Whether or not to enable the dl() function.  The dl() function does NOT work
 811 ; properly in multithreaded servers, such as IIS or Zeus, and is automatically
 812 ; disabled on them.
 813 ; http://www.php.net/manual/en/info.configuration.php#ini.enable-dl
 814 enable_dl = Off
 815 
 816 ; cgi.force_redirect is necessary to provide security running PHP as a CGI under
 817 ; most web servers.  Left undefined, PHP turns this on by default.  You can
 818 ; turn it off here AT YOUR OWN RISK
 819 ; **You CAN safely turn this off for IIS, in fact, you MUST.**
 820 ; http://www.php.net/manual/en/ini.core.php#ini.cgi.force-redirect
 821 ;cgi.force_redirect = 1
 822 
 823 ; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
 824 ; every request. PHP's default behavior is to disable this feature.
 825 ;cgi.nph = 1
 826 
 827 ; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
 828 ; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
 829 ; will look for to know it is OK to continue execution.  Setting this variable MAY
 830 ; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
 831 ; http://www.php.net/manual/en/ini.core.php#ini.cgi.redirect-status-env
 832 ;cgi.redirect_status_env = ;
 833 
 834 ; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI.  PHP's
 835 ; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
 836 ; what PATH_INFO is.  For more information on PATH_INFO, see the cgi specs.  Setting
 837 ; this to 1 will cause PHP CGI to fix its paths to conform to the spec.  A setting
 838 ; of zero causes PHP to behave as before.  Default is 1.  You should fix your scripts
 839 ; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
 840 ; http://www.php.net/manual/en/ini.core.php#ini.cgi.fix-pathinfo
 841 ;cgi.fix_pathinfo=1
 842 
 843 ; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
 844 ; security tokens of the calling client.  This allows IIS to define the
 845 ; security context that the request runs under.  mod_fastcgi under Apache
 846 ; does not currently support this feature (03/17/2002)
 847 ; Set to 1 if running under IIS.  Default is zero.
 848 ; http://www.php.net/manual/en/ini.core.php#ini.fastcgi.impersonate
 849 ;fastcgi.impersonate = 1;
 850 
 851 ; Disable logging through FastCGI connection. PHP's default behavior is to enable
 852 ; this feature.
 853 ;fastcgi.logging = 0
 854 
 855 ; cgi.rfc2616_headers configuration option tells PHP what type of headers to
 856 ; use when sending HTTP response code. If it's set 0 PHP sends Status: header that
 857 ; is supported by Apache. When this option is set to 1 PHP will send
 858 ; RFC2616 compliant header.
 859 ; Default is zero.
 860 ; http://www.php.net/manual/en/ini.core.php#ini.cgi.rfc2616-headers
 861 ;cgi.rfc2616_headers = 0
 862 
 863 ;;;;;;;;;;;;;;;;
 864 ; File Uploads ;
 865 ;;;;;;;;;;;;;;;;
 866 
 867 ; Whether to allow HTTP file uploads.
 868 ; http://www.php.net/manual/en/ini.core.php#ini.file-uploads
 869 file_uploads = On
 870 
 871 ; Temporary directory for HTTP uploaded files (will use system default if not
 872 ; specified).
 873 ; http://www.php.net/manual/en/ini.core.php#ini.upload-tmp-dir
 874 ;upload_tmp_dir =
 875 
 876 ; Maximum allowed size for uploaded files.
 877 ; http://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize
 878 upload_max_filesize = 2M
 879 
 880 ;;;;;;;;;;;;;;;;;;
 881 ; Fopen wrappers ;
 882 ;;;;;;;;;;;;;;;;;;
 883 
 884 ; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
 885 ; http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen
 886 allow_url_fopen = On
 887 
 888 ; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
 889 ; http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-include
 890 allow_url_include = Off
 891 
 892 ; Define the anonymous ftp password (your email address). PHP's default setting
 893 ; for this is empty.
 894 ; http://www.php.net/manual/en/filesystem.configuration.php#ini.from
 895 ;from="john@doe.com"
 896 
 897 ; Define the User-Agent string. PHP's default setting for this is empty.
 898 ; http://www.php.net/manual/en/filesystem.configuration.php#ini.user-agent
 899 ;user_agent="PHP"
 900 
 901 ; Default timeout for socket based streams (seconds)
 902 ; http://www.php.net/manual/en/filesystem.configuration.php#ini.default-socket-timeout
 903 default_socket_timeout = 60
 904 
 905 ; If your scripts have to deal with files from Macintosh systems,
 906 ; or you are running on a Mac and need to deal with files from
 907 ; unix or win32 systems, setting this flag will cause PHP to
 908 ; automatically detect the EOL character in those files so that
 909 ; fgets() and file() will work regardless of the source of the file.
 910 ; http://www.php.net/manual/en/filesystem.configuration.php#ini.auto-detect-line-endings
 911 ;auto_detect_line_endings = Off
 912 
 913 ;;;;;;;;;;;;;;;;;;;;;;
 914 ; Dynamic Extensions ;
 915 ;;;;;;;;;;;;;;;;;;;;;;
 916 
 917 ; If you wish to have an extension loaded automatically, use the following
 918 ; syntax:
 919 ;
 920 ;   extension=modulename.extension
 921 ;
 922 ; For example
 923 ;
 924 ;   extension=msql.so
 925 ;
 926 ; ... or with a path:
 927 ;
 928 ;   extension=/path/to/extension/msql.so
 929 ;
 930 ; If you only provide the name of the extension, PHP will look for it in its
 931 ; default extension directory.
 932 
 933 ;;;;
 934 ; Note: packaged extension modules are now loaded via the .ini files
 935 ; found in the directory /etc/php.d; these are loaded by default.
 936 ;;;;
 937 
 938 
 939 ;;;;;;;;;;;;;;;;;;;
 940 ; Module Settings ;
 941 ;;;;;;;;;;;;;;;;;;;
 942 
 943 [Date]
 944 ; Defines the default timezone used by the date functions
 945 ; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
 946 ;date.timezone =
 947 
 948 ; http://www.php.net/manual/en/datetime.configuration.php#ini.date.default-latitude
 949 ;date.default_latitude = 31.7667
 950 
 951 ; http://www.php.net/manual/en/datetime.configuration.php#ini.date.default-longitude
 952 ;date.default_longitude = 35.2333
 953 
 954 ; http://www.php.net/manual/en/datetime.configuration.php#ini.date.sunrise-zenith
 955 ;date.sunrise_zenith = 90.583333
 956 
 957 ; http://www.php.net/manual/en/datetime.configuration.php#ini.date.sunset-zenith
 958 ;date.sunset_zenith = 90.583333
 959 
 960 [filter]
 961 ; http://www.php.net/manual/en/filter.configuration.php#ini.filter.default
 962 ;filter.default = unsafe_raw
 963 
 964 ; http://www.php.net/manual/en/filter.configuration.php#ini.filter.default-flags
 965 ;filter.default_flags =
 966 
 967 [iconv]
 968 ;iconv.input_encoding = ISO-8859-1
 969 ;iconv.internal_encoding = ISO-8859-1
 970 ;iconv.output_encoding = ISO-8859-1
 971 
 972 [intl]
 973 ;intl.default_locale = 
 974 
 975 [sqlite]
 976 ; http://www.php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case
 977 ;sqlite.assoc_case = 0
 978 
 979 [sqlite3]
 980 ;sqlite3.extension_dir =
 981 
 982 [Pcre]
 983 ;PCRE library backtracking limit.
 984 ; http://www.php.net/manual/en/pcre.configuration.php#ini.pcre.backtrack-limit
 985 ;pcre.backtrack_limit=100000
 986 
 987 ;PCRE library recursion limit. 
 988 ;Please note that if you set this value to a high number you may consume all 
 989 ;the available process stack and eventually crash PHP (due to reaching the 
 990 ;stack size limit imposed by the Operating System).
 991 ; http://www.php.net/manual/en/pcre.configuration.php#ini.pcre.recursion-limit
 992 ;pcre.recursion_limit=100000
 993 
 994 [Pdo]
 995 ; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off"
 996 ; http://www.php.net/manual/en/ref.pdo-odbc.php#ini.pdo-odbc.connection-pooling
 997 ;pdo_odbc.connection_pooling=strict
 998 
 999 [Phar]
1000 ; http://www.php.net/manual/en/phar.configuration.php#ini.phar.readonly
1001 ;phar.readonly = On
1002 
1003 ; http://www.php.net/manual/en/phar.configuration.php#ini.phar.require-hash
1004 ;phar.require_hash = On
1005 
1006 ;phar.cache_list =
1007 
1008 [Syslog]
1009 ; Whether or not to define the various syslog variables (e.g. $LOG_PID,
1010 ; $LOG_CRON, etc.).  Turning it off is a good idea performance-wise.  In
1011 ; runtime, you can define these variables by calling define_syslog_variables().
1012 ; http://www.php.net/manual/en/network.configuration.php#ini.define-syslog-variables
1013 define_syslog_variables  = Off
1014 
1015 [mail function]
1016 ; For Win32 only.
1017 ; http://www.php.net/manual/en/mail.configuration.php#ini.smtp
1018 SMTP = localhost
1019 ; http://www.php.net/manual/en/mail.configuration.php#ini.smtp-port
1020 smtp_port = 25
1021 
1022 ; For Win32 only.
1023 ; http://www.php.net/manual/en/mail.configuration.php#ini.sendmail-from
1024 ;sendmail_from = me@example.com
1025 
1026 ; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
1027 ; http://www.php.net/manual/en/mail.configuration.php#ini.sendmail-path
1028 sendmail_path = /usr/sbin/sendmail -t -i
1029 
1030 ; Force the addition of the specified parameters to be passed as extra parameters
1031 ; to the sendmail binary. These parameters will always replace the value of
1032 ; the 5th parameter to mail(), even in safe mode.
1033 ;mail.force_extra_parameters =
1034 
1035 ; Add X-PHP-Originaiting-Script: that will include uid of the script followed by the filename
1036 mail.add_x_header = On
1037 
1038 ; Log all mail() calls including the full path of the script, line #, to address and headers
1039 ;mail.log =
1040 
1041 [SQL]
1042 ; http://www.php.net/manual/en/ini.core.php#ini.sql.safe-mode
1043 sql.safe_mode = Off
1044 
1045 [ODBC]
1046 ; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.default-db
1047 ;odbc.default_db    =  Not yet implemented
1048 
1049 ; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.default-user
1050 ;odbc.default_user  =  Not yet implemented
1051 
1052 ; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.default-pw
1053 ;odbc.default_pw    =  Not yet implemented
1054 
1055 ; Allow or prevent persistent links.
1056 ; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.allow-persistent
1057 odbc.allow_persistent = On
1058 
1059 ; Check that a connection is still valid before reuse.
1060 ; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.check-persistent
1061 odbc.check_persistent = On
1062 
1063 ; Maximum number of persistent links.  -1 means no limit.
1064 ; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.max-persistent
1065 odbc.max_persistent = -1
1066 
1067 ; Maximum number of links (persistent + non-persistent).  -1 means no limit.
1068 ; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.max-links
1069 odbc.max_links = -1
1070 
1071 ; Handling of LONG fields.  Returns number of bytes to variables.  0 means
1072 ; passthru.
1073 ; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.defaultlrl
1074 odbc.defaultlrl = 4096
1075 
1076 ; Handling of binary data.  0 means passthru, 1 return as is, 2 convert to char.
1077 ; See the documentation on odbc_binmode and odbc_longreadlen for an explanation
1078 ; of uodbc.defaultlrl and uodbc.defaultbinmode
1079 ; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.defaultbinmode
1080 odbc.defaultbinmode = 1
1081 
1082 ;birdstep.max_links = -1
1083 
1084 [MySQL]
1085 ; Allow or prevent persistent links.
1086 ; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.allow-persistent
1087 mysql.allow_persistent = On
1088 
1089 ; Maximum number of persistent links.  -1 means no limit.
1090 ; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.max-persistent
1091 mysql.max_persistent = -1
1092 
1093 ; Maximum number of links (persistent + non-persistent).  -1 means no limit.
1094 ; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.max-links
1095 mysql.max_links = -1
1096 
1097 ; Default port number for mysql_connect().  If unset, mysql_connect() will use
1098 ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
1099 ; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
1100 ; at MYSQL_PORT.
1101 ; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.default-port
1102 mysql.default_port =
1103 
1104 ; Default socket name for local MySQL connects.  If empty, uses the built-in
1105 ; MySQL defaults.
1106 ; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.default-socket
1107 mysql.default_socket =
1108 
1109 ; Default host for mysql_connect() (doesn't apply in safe mode).
1110 ; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.default-host
1111 mysql.default_host =
1112 
1113 ; Default user for mysql_connect() (doesn't apply in safe mode).
1114 ; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.default-user
1115 mysql.default_user =
1116 
1117 ; Default password for mysql_connect() (doesn't apply in safe mode).
1118 ; Note that this is generally a *bad* idea to store passwords in this file.
1119 ; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
1120 ; and reveal this password!  And of course, any users with read access to this
1121 ; file will be able to reveal the password as well.
1122 ; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.default-password
1123 mysql.default_password =
1124 
1125 ; Maximum time (in seconds) for connect timeout. -1 means no limit
1126 ; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.connect-timeout
1127 mysql.connect_timeout = 60
1128 
1129 ; Trace mode. When trace_mode is active (=On), warnings for table/index scans and
1130 ; SQL-Errors will be displayed.
1131 ; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.trace-mode
1132 mysql.trace_mode = Off
1133 
1134 [MySQLi]
1135 
1136 ; Maximum number of links.  -1 means no limit.
1137 ; http://www.php.net/manual/en/mysqli.configuration.php#ini.mysqli.max-links
1138 mysqli.max_links = -1
1139 
1140 ; Default port number for mysqli_connect().  If unset, mysqli_connect() will use
1141 ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
1142 ; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
1143 ; at MYSQL_PORT.
1144 ; http://www.php.net/manual/en/mysqli.configuration.php#ini.mysqli.default-port
1145 mysqli.default_port = 3306
1146 
1147 ; Default socket name for local MySQL connects.  If empty, uses the built-in
1148 ; MySQL defaults.
1149 ; http://www.php.net/manual/en/mysqli.configuration.php#ini.mysqli.default-socket
1150 mysqli.default_socket =
1151 
1152 ; Default host for mysql_connect() (doesn't apply in safe mode).
1153 ; http://www.php.net/manual/en/mysqli.configuration.php#ini.mysqli.default-host
1154 mysqli.default_host =
1155 
1156 ; Default user for mysql_connect() (doesn't apply in safe mode).
1157 ; http://www.php.net/manual/en/mysqli.configuration.php#ini.mysqli.default-user
1158 mysqli.default_user =
1159 
1160 ; Default password for mysqli_connect() (doesn't apply in safe mode).
1161 ; Note that this is generally a *bad* idea to store passwords in this file.
1162 ; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")
1163 ; and reveal this password!  And of course, any users with read access to this
1164 ; file will be able to reveal the password as well.
1165 ; http://www.php.net/manual/en/mysqli.configuration.php#ini.mysqli.default-pw
1166 mysqli.default_pw =
1167 
1168 ; Allow or prevent reconnect
1169 mysqli.reconnect = Off
1170 
1171 [PostgresSQL]
1172 ; Allow or prevent persistent links.
1173 ; http://www.php.net/manual/en/pgsql.configuration.php#ini.pgsql.allow-persistent
1174 pgsql.allow_persistent = On
1175 
1176 ; Detect broken persistent links always with pg_pconnect().
1177 ; Auto reset feature requires a little overheads.
1178 ; http://www.php.net/manual/en/pgsql.configuration.php#ini.pgsql.auto-reset-persistent
1179 pgsql.auto_reset_persistent = Off
1180 
1181 ; Maximum number of persistent links.  -1 means no limit.
1182 ; http://www.php.net/manual/en/pgsql.configuration.php#ini.pgsql.max-persistent
1183 pgsql.max_persistent = -1
1184 
1185 ; Maximum number of links (persistent+non persistent).  -1 means no limit.
1186 ; http://www.php.net/manual/en/pgsql.configuration.php#ini.pgsql.max-links
1187 pgsql.max_links = -1
1188 
1189 ; Ignore PostgreSQL backends Notice message or not.
1190 ; Notice message logging require a little overheads.
1191 ; http://www.php.net/manual/en/pgsql.configuration.php#ini.pgsql.ignore-notice
1192 pgsql.ignore_notice = 0
1193 
1194 ; Log PostgreSQL backends Noitce message or not.
1195 ; Unless pgsql.ignore_notice=0, module cannot log notice message.
1196 ; http://www.php.net/manual/en/pgsql.configuration.php#ini.pgsql.log-notice
1197 pgsql.log_notice = 0
1198 
1199 [Sybase-CT]
1200 ; Allow or prevent persistent links.
1201 ; http://www.php.net/manual/en/sybase.configuration.php#ini.sybct.allow-persistent
1202 sybct.allow_persistent = On
1203 
1204 ; Maximum number of persistent links.  -1 means no limit.
1205 ; http://www.php.net/manual/en/sybase.configuration.php#ini.sybct.max-persistent
1206 sybct.max_persistent = -1
1207 
1208 ; Maximum number of links (persistent + non-persistent).  -1 means no limit.
1209 ; http://www.php.net/manual/en/sybase.configuration.php#ini.sybct.max-links
1210 sybct.max_links = -1
1211 
1212 ; Minimum server message severity to display.
1213 ; http://www.php.net/manual/en/sybase.configuration.php#ini.sybct.min-server-severity
1214 sybct.min_server_severity = 10
1215 
1216 ; Minimum client message severity to display.
1217 ; http://www.php.net/manual/en/sybase.configuration.php#ini.sybct.min-client-severity
1218 sybct.min_client_severity = 10
1219 
1220 ; Set per-context timeout
1221 ; http://www.php.net/manual/en/sybase.configuration.php#ini.sybct.timeout
1222 ;sybct.timeout=
1223 
1224 ;sybct.packet_size
1225 
1226 [bcmath]
1227 ; Number of decimal digits for all bcmath functions.
1228 ; http://www.php.net/manual/en/bc.configuration.php#ini.bcmath.scale
1229 bcmath.scale = 0
1230 
1231 [browscap]
1232 ; http://www.php.net/manual/en/misc.configuration.php#ini.browscap
1233 ;browscap = extra/browscap.ini
1234 
1235 [Session]
1236 ; Handler used to store/retrieve data.
1237 ; http://www.php.net/manual/en/session.configuration.php#ini.session.save-handler
1238 session.save_handler = files
1239 
1240 ; Argument passed to save_handler.  In the case of files, this is the path
1241 ; where data files are stored. Note: Windows users have to change this
1242 ; variable in order to use PHP's session functions.
1243 ;
1244 ; As of PHP 4.0.1, you can define the path as:
1245 ;
1246 ;     session.save_path = "N;/path"
1247 ;
1248 ; where N is an integer.  Instead of storing all the session files in
1249 ; /path, what this will do is use subdirectories N-levels deep, and
1250 ; store the session data in those directories.  This is useful if you
1251 ; or your OS have problems with lots of files in one directory, and is
1252 ; a more efficient layout for servers that handle lots of sessions.
1253 ;
1254 ; NOTE 1: PHP will not create this directory structure automatically.
1255 ;         You can use the script in the ext/session dir for that purpose.
1256 ; NOTE 2: See the section on garbage collection below if you choose to
1257 ;         use subdirectories for session storage
1258 ;
1259 ; The file storage module creates files using mode 600 by default.
1260 ; You can change that by using
1261 ;
1262 ;     session.save_path = "N;MODE;/path"
1263 ;
1264 ; where MODE is the octal representation of the mode. Note that this
1265 ; does not overwrite the process's umask.
1266 ; http://www.php.net/manual/en/session.configuration.php#ini.session.save-path
1267 session.save_path = "/var/lib/php/session"
1268 
1269 ; Whether to use cookies.
1270 ; http://www.php.net/manual/en/session.configuration.php#ini.session.use-cookies
1271 session.use_cookies = 1
1272 
1273 ; http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-secure
1274 ;session.cookie_secure =
1275 
1276 ; This option forces PHP to fetch and use a cookie for storing and maintaining
1277 ; the session id. We encourage this operation as it's very helpful in combatting
1278 ; session hijacking when not specifying and managing your own session id. It is
1279 ; not the end all be all of session hijacking defense, but it's a good start.
1280 ; http://www.php.net/manual/en/session.configuration.php#ini.session.use-only-cookies
1281 session.use_only_cookies = 1
1282 
1283 ; Name of the session (used as cookie name).
1284 ; http://www.php.net/manual/en/session.configuration.php#ini.session.name
1285 session.name = PHPSESSID
1286 
1287 ; Initialize session on request startup.
1288 ; http://www.php.net/manual/en/session.configuration.php#ini.session.auto-start
1289 session.auto_start = 0
1290 
1291 ; Lifetime in seconds of cookie or, if 0, until browser is restarted.
1292 ; http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-lifetime
1293 session.cookie_lifetime = 0
1294 
1295 ; The path for which the cookie is valid.
1296 ; http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-path
1297 session.cookie_path = /
1298 
1299 ; The domain for which the cookie is valid.
1300 ; http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-domain
1301 session.cookie_domain =
1302 
1303 ; Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser scripting languages such as JavaScript.
1304 ; http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-httponly
1305 session.cookie_httponly = 
1306 
1307 ; Handler used to serialize data.  php is the standard serializer of PHP.
1308 ; http://www.php.net/manual/en/session.configuration.php#ini.session.serialize-handler
1309 session.serialize_handler = php
1310 
1311 ; Defines the probability that the 'garbage collection' process is started
1312 ; on every session initialization. The probability is calculated by using
1313 ; gc_probability/gc_divisor. Where session.gc_probability is the numerator
1314 ; and gc_divisor is the denominator in the equation. Setting this value to 1
1315 ; when the session.gc_divisor value is 100 will give you approximately a 1% chance
1316 ; the gc will run on any give request.
1317 ; Default Value: 1
1318 ; Development Value: 1
1319 ; Production Value: 1
1320 ; http://www.php.net/manual/en/session.configuration.php#ini.session.gc-probability
1321 session.gc_probability = 1
1322 
1323 ; Defines the probability that the 'garbage collection' process is started on every
1324 ; session initialization. The probability is calculated by using the following equation: 
1325 ; gc_probability/gc_divisor. Where session.gc_probability is the numerator and
1326 ; session.gc_divisor is the denominator in the equation. Setting this value to 1
1327 ; when the session.gc_divisor value is 100 will give you approximately a 1% chance
1328 ; the gc will run on any give request. Increasing this value to 1000 will give you
1329 ; a 0.1% chance the gc will run on any give request. For high volume production servers,
1330 ; this is a more efficient approach.
1331 ; Default Value: 100
1332 ; Development Value: 1000
1333 ; Production Value: 1000
1334 ; http://www.php.net/manual/en/session.configuration.php#ini.session.gc-divisor
1335 session.gc_divisor = 1000
1336 
1337 ; After this number of seconds, stored data will be seen as 'garbage' and
1338 ; cleaned up by the garbage collection process.
1339 ; http://www.php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime
1340 session.gc_maxlifetime = 1440
1341 
1342 ; NOTE: If you are using the subdirectory option for storing session files
1343 ;       (see session.save_path above), then garbage collection does *not*
1344 ;       happen automatically.  You will need to do your own garbage
1345 ;       collection through a shell script, cron entry, or some other method.
1346 ;       For example, the following script would is the equivalent of
1347 ;       setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
1348 ;          cd /path/to/sessions; find -cmin +24 | xargs rm
1349 
1350 ; PHP 4.2 and less have an undocumented feature/bug that allows you to
1351 ; to initialize a session variable in the global scope, even when register_globals
1352 ; is disabled.  PHP 4.3 and later will warn you, if this feature is used.
1353 ; You can disable the feature and the warning separately. At this time,
1354 ; the warning is only displayed, if bug_compat_42 is enabled. This feature
1355 ; introduces some serious security problems if not handled correctly. It's
1356 ; recommended that you do not use this feature on production servers. But you
1357 ; should enable this on development servers and enable the warning as well. If you
1358 ; do not enable the feature on development servers, you won't be warned when it's
1359 ; used and debugging errors caused by this can be difficult to track down.
1360 ; Default Value: On
1361 ; Development Value: On
1362 ; Production Value: Off
1363 ; http://www.php.net/manual/en/session.configuration.php#ini.session.bug-compat-42
1364 session.bug_compat_42 = Off
1365 
1366 ; This setting controls whether or not you are warned by PHP when initializing a
1367 ; session value into the global space. session.bug_compat_42 must be enabled before
1368 ; these warnings can be issued by PHP. See the directive above for more information.
1369 ; Default Value: On
1370 ; Development Value: On
1371 ; Production Value: Off
1372 ; http://www.php.net/manual/en/session.configuration.php#ini.session.bug-compat-warn
1373 session.bug_compat_warn = Off
1374 
1375 ; Check HTTP Referer to invalidate externally stored URLs containing ids.
1376 ; HTTP_REFERER has to contain this substring for the session to be
1377 ; considered as valid.
1378 ; http://www.php.net/manual/en/session.configuration.php#ini.session.referer-check
1379 session.referer_check =
1380 
1381 ; How many bytes to read from the file.
1382 ; http://www.php.net/manual/en/session.configuration.php#ini.session.entropy-length
1383 session.entropy_length = 0
1384 
1385 ; Specified here to create the session id.
1386 ; http://www.php.net/manual/en/session.configuration.php#ini.session.entropy-file
1387 ;session.entropy_file = /dev/urandom
1388 session.entropy_file =
1389 
1390 ; http://www.php.net/manual/en/session.configuration.php#ini.session.entropy-length
1391 ;session.entropy_length = 16
1392 
1393 ; Set to {nocache,private,public,} to determine HTTP caching aspects
1394 ; or leave this empty to avoid sending anti-caching headers.
1395 ; http://www.php.net/manual/en/session.configuration.php#ini.session.cache-limiter
1396 session.cache_limiter = nocache
1397 
1398 ; Document expires after n minutes.
1399 ; http://www.php.net/manual/en/session.configuration.php#ini.session.cache-expire
1400 session.cache_expire = 180
1401 
1402 ; trans sid support is disabled by default.
1403 ; Use of trans sid may risk your users security.
1404 ; Use this option with caution.
1405 ; - User may send URL contains active session ID
1406 ;   to other person via. email/irc/etc.
1407 ; - URL that contains active session ID may be stored
1408 ;   in publically accessible computer.
1409 ; - User may access your site with the same session ID
1410 ;   always using URL stored in browser's history or bookmarks.
1411 ; http://www.php.net/manual/en/session.configuration.php#ini.session.use-trans-sid
1412 session.use_trans_sid = 0
1413 
1414 ; Select a hash function for use in generating session ids.
1415 ; Possible Values 
1416 ;   0  (MD5 128 bits)
1417 ;   1  (SHA-1 160 bits)
1418 ; http://www.php.net/manual/en/session.configuration.php#ini.session.hash-function
1419 session.hash_function = 0
1420 
1421 ; Define how many bits are stored in each character when converting
1422 ; the binary hash data to something readable.
1423 ; Possible values:
1424 ;   4  (4 bits: 0-9, a-f)
1425 ;   5  (5 bits: 0-9, a-v)
1426 ;   6  (6 bits: 0-9, a-z, A-Z, "-", ",")
1427 ; Default Value: 4
1428 ; Development Value: 5
1429 ; Production Value: 5
1430 ; http://www.php.net/manual/en/session.configuration.php#ini.session.hash-bits-per-character
1431 session.hash_bits_per_character = 5
1432 
1433 ; The URL rewriter will look for URLs in a defined set of HTML tags.
1434 ; form/fieldset are special; if you include them here, the rewriter will
1435 ; add a hidden <input> field with the info which is otherwise appended
1436 ; to URLs.  If you want XHTML conformity, remove the form entry.
1437 ; Note that all valid entries require a "=", even if no value follows.
1438 ; Default Value: "a=href,area=href,frame=src,form=,fieldset="
1439 ; Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
1440 ; Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
1441 ; http://www.php.net/manual/en/session.configuration.php#ini.url-rewriter.tags
1442 url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
1443 
1444 [MSSQL]
1445 ; Allow or prevent persistent links.
1446 mssql.allow_persistent = On
1447 
1448 ; Maximum number of persistent links.  -1 means no limit.
1449 mssql.max_persistent = -1
1450 
1451 ; Maximum number of links (persistent+non persistent).  -1 means no limit.
1452 mssql.max_links = -1
1453 
1454 ; Minimum error severity to display.
1455 mssql.min_error_severity = 10
1456 
1457 ; Minimum message severity to display.
1458 mssql.min_message_severity = 10
1459 
1460 ; Compatibility mode with old versions of PHP 3.0.
1461 mssql.compatability_mode = Off
1462 
1463 ; Connect timeout
1464 ;mssql.connect_timeout = 5
1465 
1466 ; Query timeout
1467 ;mssql.timeout = 60
1468 
1469 ; Valid range 0 - 2147483647.  Default = 4096.
1470 ;mssql.textlimit = 4096
1471 
1472 ; Valid range 0 - 2147483647.  Default = 4096.
1473 ;mssql.textsize = 4096
1474 
1475 ; Limits the number of records in each batch.  0 = all records in one batch.
1476 ;mssql.batchsize = 0
1477 
1478 ; Specify how datetime and datetim4 columns are returned
1479 ; On => Returns data converted to SQL server settings
1480 ; Off => Returns values as YYYY-MM-DD hh:mm:ss
1481 ;mssql.datetimeconvert = On
1482 
1483 ; Use NT authentication when connecting to the server
1484 mssql.secure_connection = Off
1485 
1486 ; Specify max number of processes. -1 = library default
1487 ; msdlib defaults to 25
1488 ; FreeTDS defaults to 4096
1489 ;mssql.max_procs = -1
1490 
1491 ; Specify client character set. 
1492 ; If empty or not set the client charset from freetds.comf is used
1493 ; This is only used when compiled with FreeTDS
1494 ;mssql.charset = "ISO-8859-1"
1495 
1496 [Assertion]
1497 ; Assert(expr); active by default.
1498 ; http://www.php.net/manual/en/info.configuration.php#ini.assert.active
1499 ;assert.active = On
1500 
1501 ; Issue a PHP warning for each failed assertion.
1502 ; http://www.php.net/manual/en/info.configuration.php#ini.assert.warning
1503 ;assert.warning = On
1504 
1505 ; Don't bail out by default.
1506 ; http://www.php.net/manual/en/info.configuration.php#ini.assert.bail
1507 ;assert.bail = Off
1508 
1509 ; User-function to be called if an assertion fails.
1510 ; http://www.php.net/manual/en/info.configuration.php#ini.assert.callback
1511 ;assert.callback = 0
1512 
1513 ; Eval the expression with current error_reporting().  Set to true if you want
1514 ; error_reporting(0) around the eval().
1515 ; http://www.php.net/manual/en/info.configuration.php#ini.assert.quiet-eval
1516 ;assert.quiet_eval = 0
1517 
1518 [COM]
1519 ; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs
1520 ; http://www.php.net/manual/en/com.configuration.php#ini.com.typelib-file
1521 ;com.typelib_file =
1522 
1523 ; allow Distributed-COM calls
1524 ; http://www.php.net/manual/en/com.configuration.php#ini.com.allow-dcom
1525 ;com.allow_dcom = true
1526 
1527 ; autoregister constants of a components typlib on com_load()
1528 ; http://www.php.net/manual/en/com.configuration.php#ini.com.autoregister-typelib
1529 ;com.autoregister_typelib = true
1530 
1531 ; register constants casesensitive
1532 ; http://www.php.net/manual/en/com.configuration.php#ini.com.autoregister-casesensitive
1533 ;com.autoregister_casesensitive = false
1534 
1535 ; show warnings on duplicate constant registrations
1536 ; http://www.php.net/manual/en/com.configuration.php#ini.com.autoregister-verbose
1537 ;com.autoregister_verbose = true
1538 
1539 [mbstring]
1540 ; language for internal character representation.
1541 ; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.language
1542 ;mbstring.language = Japanese
1543 
1544 ; internal/script encoding.
1545 ; Some encoding cannot work as internal encoding.
1546 ; (e.g. SJIS, BIG5, ISO-2022-*)
1547 ; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.internal-encoding
1548 ;mbstring.internal_encoding = EUC-JP
1549 
1550 ; http input encoding.
1551 ; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.http-input
1552 ;mbstring.http_input = auto
1553 
1554 ; http output encoding. mb_output_handler must be
1555 ; registered as output buffer to function
1556 ; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.http-output
1557 ;mbstring.http_output = SJIS
1558 
1559 ; enable automatic encoding translation according to
1560 ; mbstring.internal_encoding setting. Input chars are
1561 ; converted to internal encoding by setting this to On.
1562 ; Note: Do _not_ use automatic encoding translation for
1563 ;       portable libs/applications.
1564 ; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.encoding-translation
1565 ;mbstring.encoding_translation = Off
1566 
1567 ; automatic encoding detection order.
1568 ; auto means
1569 ; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.detect-order
1570 ;mbstring.detect_order = auto
1571 
1572 ; substitute_character used when character cannot be converted
1573 ; one from another
1574 ; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.substitute-character
1575 ;mbstring.substitute_character = none;
1576 
1577 ; overload(replace) single byte functions by mbstring functions.
1578 ; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
1579 ; etc. Possible values are 0,1,2,4 or combination of them.
1580 ; For example, 7 for overload everything.
1581 ; 0: No overload
1582 ; 1: Overload mail() function
1583 ; 2: Overload str*() functions
1584 ; 4: Overload ereg*() functions
1585 ; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.func-overload
1586 ;mbstring.func_overload = 0
1587 
1588 ; enable strict encoding detection.
1589 ;mbstring.strict_detection = Off
1590 
1591 ; This directive specifies the regex pattern of content types for which mb_output_handler()
1592 ; is activated.
1593 ; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml)
1594 ;mbstring.http_output_conv_mimetype=
1595 
1596 [gd]
1597 ; Tell the jpeg decode to ignore warnings and try to create
1598 ; a gd image. The warning will then be displayed as notices
1599 ; disabled by default
1600 ; http://www.php.net/manual/en/image.configuration.php#ini.image.jpeg-ignore-warning
1601 ;gd.jpeg_ignore_warning = 0
1602 
1603 [exif]
1604 ; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS.
1605 ; With mbstring support this will automatically be converted into the encoding
1606 ; given by corresponding encode setting. When empty mbstring.internal_encoding
1607 ; is used. For the decode settings you can distinguish between motorola and
1608 ; intel byte order. A decode setting cannot be empty.
1609 ; http://www.php.net/manual/en/exif.configuration.php#ini.exif.encode-unicode
1610 ;exif.encode_unicode = ISO-8859-15
1611 
1612 ; http://www.php.net/manual/en/exif.configuration.php#ini.exif.decode-unicode-motorola
1613 ;exif.decode_unicode_motorola = UCS-2BE
1614 
1615 ; http://www.php.net/manual/en/exif.configuration.php#ini.exif.decode-unicode-intel
1616 ;exif.decode_unicode_intel    = UCS-2LE
1617 
1618 ; http://www.php.net/manual/en/exif.configuration.php#ini.exif.encode-jis
1619 ;exif.encode_jis =
1620 
1621 ; http://www.php.net/manual/en/exif.configuration.php#ini.exif.decode-jis-motorola
1622 ;exif.decode_jis_motorola = JIS
1623 
1624 ; http://www.php.net/manual/en/exif.configuration.php#ini.exif.decode-jis-intel
1625 ;exif.decode_jis_intel    = JIS
1626 
1627 [Tidy]
1628 ; The path to a default tidy configuration file to use when using tidy
1629 ; http://www.php.net/manual/en/tidy.configuration.php#ini.tidy.default-config
1630 ;tidy.default_config = /usr/local/lib/php/default.tcfg
1631 
1632 ; Should tidy clean and repair output automatically?
1633 ; WARNING: Do not use this option if you are generating non-html content
1634 ; such as dynamic images
1635 ; http://www.php.net/manual/en/tidy.configuration.php#ini.tidy.clean-output
1636 tidy.clean_output = Off
1637 
1638 [soap]
1639 ; Enables or disables WSDL caching feature.
1640 ; http://www.php.net/manual/en/soap.configuration.php#ini.soap.wsdl-cache-enabled
1641 soap.wsdl_cache_enabled=1
1642 
1643 ; Sets the directory name where SOAP extension will put cache files.
1644 ; http://www.php.net/manual/en/soap.configuration.php#ini.soap.wsdl-cache-dir
1645 soap.wsdl_cache_dir="/tmp"
1646 
1647 ; (time to live) Sets the number of second while cached file will be used 
1648 ; instead of original one.
1649 ; http://www.php.net/manual/en/soap.configuration.php#ini.soap.wsdl-cache-ttl
1650 soap.wsdl_cache_ttl=86400
1651 
1652 [sysvshm]
1653 ; A default size of the shared memory segment
1654 ;sysvshm.init_mem = 10000
1655 
1656 [extension]
1657 extension=redis.so
1658 extension=imagick.so
1659 ; Local Variables:
1660 ; tab-width: 4
1661 ; End:
View Code

 

php-fpm.conf 配置

  1 ;;;;;;;;;;;;;;;;;;;;;
  2 ; FPM Configuration ;
  3 ;;;;;;;;;;;;;;;;;;;;;
  4 
  5 ; All relative paths in this configuration file are relative to PHP's install
  6 ; prefix (/usr/local/php5445). This prefix can be dynamically changed by using the
  7 ; '-p' argument from the command line.
  8 
  9 ; Include one or more files. If glob(3) exists, it is used to include a bunch of
 10 ; files from a glob(3) pattern. This directive can be used everywhere in the
 11 ; file.
 12 ; Relative path can also be used. They will be prefixed by:
 13 ;  - the global prefix if it's been set (-p argument)
 14 ;  - /usr/local/php5445 otherwise
 15 ;include=etc/fpm.d/*.conf
 16 
 17 ;;;;;;;;;;;;;;;;;;
 18 ; Global Options ;
 19 ;;;;;;;;;;;;;;;;;;
 20 
 21 [global]
 22 ; Pid file
 23 ; Note: the default prefix is /usr/local/php5445/var
 24 ; Default Value: none
 25 ;pid = run/php-fpm.pid
 26 
 27 ; Error log file
 28 ; If it's set to "syslog", log is sent to syslogd instead of being written
 29 ; in a local file.
 30 ; Note: the default prefix is /usr/local/php5445/var
 31 ; Default Value: log/php-fpm.log
 32 ;error_log = log/php-fpm.log
 33 
 34 ; syslog_facility is used to specify what type of program is logging the
 35 ; message. This lets syslogd specify that messages from different facilities
 36 ; will be handled differently.
 37 ; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
 38 ; Default Value: daemon
 39 ;syslog.facility = daemon
 40 
 41 ; syslog_ident is prepended to every message. If you have multiple FPM
 42 ; instances running on the same server, you can change the default value
 43 ; which must suit common needs.
 44 ; Default Value: php-fpm
 45 ;syslog.ident = php-fpm
 46 
 47 ; Log level
 48 ; Possible Values: alert, error, warning, notice, debug
 49 ; Default Value: notice
 50 ;log_level = notice
 51 
 52 ; If this number of child processes exit with SIGSEGV or SIGBUS within the time
 53 ; interval set by emergency_restart_interval then FPM will restart. A value
 54 ; of '0' means 'Off'.
 55 ; Default Value: 0
 56 ;emergency_restart_threshold = 0
 57 
 58 ; Interval of time used by emergency_restart_interval to determine when 
 59 ; a graceful restart will be initiated.  This can be useful to work around
 60 ; accidental corruptions in an accelerator's shared memory.
 61 ; Available Units: s(econds), m(inutes), h(ours), or d(ays)
 62 ; Default Unit: seconds
 63 ; Default Value: 0
 64 ;emergency_restart_interval = 0
 65 
 66 ; Time limit for child processes to wait for a reaction on signals from master.
 67 ; Available units: s(econds), m(inutes), h(ours), or d(ays)
 68 ; Default Unit: seconds
 69 ; Default Value: 0
 70 ;process_control_timeout = 0
 71 
 72 ; The maximum number of processes FPM will fork. This has been design to control
 73 ; the global number of processes when using dynamic PM within a lot of pools.
 74 ; Use it with caution.
 75 ; Note: A value of 0 indicates no limit
 76 ; Default Value: 0
 77 ; process.max = 128
 78 
 79 ; Specify the nice(2) priority to apply to the master process (only if set)
 80 ; The value can vary from -19 (highest priority) to 20 (lower priority)
 81 ; Note: - It will only work if the FPM master process is launched as root
 82 ;       - The pool process will inherit the master process priority
 83 ;         unless it specified otherwise
 84 ; Default Value: no set
 85 ; process.priority = -19
 86 
 87 ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
 88 ; Default Value: yes
 89 ;daemonize = yes
 90  
 91 ; Set open file descriptor rlimit for the master process.
 92 ; Default Value: system defined value
 93 ;rlimit_files = 1024
 94  
 95 ; Set max core size rlimit for the master process.
 96 ; Possible Values: 'unlimited' or an integer greater or equal to 0
 97 ; Default Value: system defined value
 98 ;rlimit_core = 0
 99 
100 ; Specify the event mechanism FPM will use. The following is available:
101 ; - select     (any POSIX os)
102 ; - poll       (any POSIX os)
103 ; - epoll      (linux >= 2.5.44)
104 ; - kqueue     (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
105 ; - /dev/poll  (Solaris >= 7)
106 ; - port       (Solaris >= 10)
107 ; Default Value: not set (auto detection)
108 ;events.mechanism = epoll
109 
110 ; When FPM is build with systemd integration, specify the interval,
111 ; in second, between health report notification to systemd.
112 ; Set to 0 to disable.
113 ; Available Units: s(econds), m(inutes), h(ours)
114 ; Default Unit: seconds
115 ; Default value: 10
116 ;systemd_interval = 10
117 
118 ;;;;;;;;;;;;;;;;;;;;
119 ; Pool Definitions ; 
120 ;;;;;;;;;;;;;;;;;;;;
121 
122 ; Multiple pools of child processes may be started with different listening
123 ; ports and different management options.  The name of the pool will be
124 ; used in logs and stats. There is no limitation on the number of pools which
125 ; FPM can handle. Your system will tell you anyway :)
126 
127 ; Start a new pool named 'www'.
128 ; the variable $pool can we used in any directive and will be replaced by the
129 ; pool name ('www' here)
130 [www]
131 
132 ; Per pool prefix
133 ; It only applies on the following directives:
134 ; - 'slowlog'
135 ; - 'listen' (unixsocket)
136 ; - 'chroot'
137 ; - 'chdir'
138 ; - 'php_values'
139 ; - 'php_admin_values'
140 ; When not set, the global prefix (or /usr/local/php5445) applies instead.
141 ; Note: This directive can also be relative to the global prefix.
142 ; Default Value: none
143 ;prefix = /path/to/pools/$pool
144 
145 ; Unix user/group of processes
146 ; Note: The user is mandatory. If the group is not set, the default user's group
147 ;       will be used.
148 user = apache
149 group = apache
150 
151 ; The address on which to accept FastCGI requests.
152 ; Valid syntaxes are:
153 ;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific address on
154 ;                            a specific port;
155 ;   'port'                 - to listen on a TCP socket to all addresses on a
156 ;                            specific port;
157 ;   '/path/to/unix/socket' - to listen on a unix socket.
158 ; Note: This value is mandatory.
159 listen = 127.0.0.1:9000
160 
161 ; Set listen(2) backlog.
162 ; Default Value: 128 (-1 on FreeBSD and OpenBSD)
163 ;listen.backlog = 128
164 
165 ; Set permissions for unix socket, if one is used. In Linux, read/write
166 ; permissions must be set in order to allow connections from a web server. Many
167 ; BSD-derived systems allow connections regardless of permissions. 
168 ; Default Values: user and group are set as the running user
169 ;                 mode is set to 0660
170 ;listen.owner = apache
171 ;listen.group = apache
172 ;listen.mode = 0660
173  
174 ; List of ipv4 addresses of FastCGI clients which are allowed to connect.
175 ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
176 ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
177 ; must be separated by a comma. If this value is left blank, connections will be
178 ; accepted from any ip address.
179 ; Default Value: any
180 ;listen.allowed_clients = 127.0.0.1
181 
182 ; Specify the nice(2) priority to apply to the pool processes (only if set)
183 ; The value can vary from -19 (highest priority) to 20 (lower priority)
184 ; Note: - It will only work if the FPM master process is launched as root
185 ;       - The pool processes will inherit the master process priority
186 ;         unless it specified otherwise
187 ; Default Value: no set
188 ; process.priority = -19
189 
190 ; Choose how the process manager will control the number of child processes.
191 ; Possible Values:
192 ;   static  - a fixed number (pm.max_children) of child processes;
193 ;   dynamic - the number of child processes are set dynamically based on the
194 ;             following directives. With this process management, there will be
195 ;             always at least 1 children.
196 ;             pm.max_children      - the maximum number of children that can
197 ;                                    be alive at the same time.
198 ;             pm.start_servers     - the number of children created on startup.
199 ;             pm.min_spare_servers - the minimum number of children in 'idle'
200 ;                                    state (waiting to process). If the number
201 ;                                    of 'idle' processes is less than this
202 ;                                    number then some children will be created.
203 ;             pm.max_spare_servers - the maximum number of children in 'idle'
204 ;                                    state (waiting to process). If the number
205 ;                                    of 'idle' processes is greater than this
206 ;                                    number then some children will be killed.
207 ;  ondemand - no children are created at startup. Children will be forked when
208 ;             new requests will connect. The following parameter are used:
209 ;             pm.max_children           - the maximum number of children that
210 ;                                         can be alive at the same time.
211 ;             pm.process_idle_timeout   - The number of seconds after which
212 ;                                         an idle process will be killed.
213 ; Note: This value is mandatory.
214 pm = dynamic
215 
216 ; The number of child processes to be created when pm is set to 'static' and the
217 ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
218 ; This value sets the limit on the number of simultaneous requests that will be
219 ; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
220 ; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
221 ; CGI. The below defaults are based on a server without much resources. Don't
222 ; forget to tweak pm.* to fit your needs.
223 ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
224 ; Note: This value is mandatory.
225 pm.max_children = 5
226 
227 ; The number of child processes created on startup.
228 ; Note: Used only when pm is set to 'dynamic'
229 ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
230 pm.start_servers = 2
231 
232 ; The desired minimum number of idle server processes.
233 ; Note: Used only when pm is set to 'dynamic'
234 ; Note: Mandatory when pm is set to 'dynamic'
235 pm.min_spare_servers = 1
236 
237 ; The desired maximum number of idle server processes.
238 ; Note: Used only when pm is set to 'dynamic'
239 ; Note: Mandatory when pm is set to 'dynamic'
240 pm.max_spare_servers = 3
241 
242 ; The number of seconds after which an idle process will be killed.
243 ; Note: Used only when pm is set to 'ondemand'
244 ; Default Value: 10s
245 ;pm.process_idle_timeout = 10s;
246  
247 ; The number of requests each child process should execute before respawning.
248 ; This can be useful to work around memory leaks in 3rd party libraries. For
249 ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
250 ; Default Value: 0
251 ;pm.max_requests = 500
252 
253 ; The URI to view the FPM status page. If this value is not set, no URI will be
254 ; recognized as a status page. It shows the following informations:
255 ;   pool                 - the name of the pool;
256 ;   process manager      - static, dynamic or ondemand;
257 ;   start time           - the date and time FPM has started;
258 ;   start since          - number of seconds since FPM has started;
259 ;   accepted conn        - the number of request accepted by the pool;
260 ;   listen queue         - the number of request in the queue of pending
261 ;                          connections (see backlog in listen(2));
262 ;   max listen queue     - the maximum number of requests in the queue
263 ;                          of pending connections since FPM has started;
264 ;   listen queue len     - the size of the socket queue of pending connections;
265 ;   idle processes       - the number of idle processes;
266 ;   active processes     - the number of active processes;
267 ;   total processes      - the number of idle + active processes;
268 ;   max active processes - the maximum number of active processes since FPM
269 ;                          has started;
270 ;   max children reached - number of times, the process limit has been reached,
271 ;                          when pm tries to start more children (works only for
272 ;                          pm 'dynamic' and 'ondemand');
273 ; Value are updated in real time.
274 ; Example output:
275 ;   pool:                 www
276 ;   process manager:      static
277 ;   start time:           01/Jul/2011:17:53:49 +0200
278 ;   start since:          62636
279 ;   accepted conn:        190460
280 ;   listen queue:         0
281 ;   max listen queue:     1
282 ;   listen queue len:     42
283 ;   idle processes:       4
284 ;   active processes:     11
285 ;   total processes:      15
286 ;   max active processes: 12
287 ;   max children reached: 0
288 ;
289 ; By default the status page output is formatted as text/plain. Passing either
290 ; 'html', 'xml' or 'json' in the query string will return the corresponding
291 ; output syntax. Example:
292 ;   http://www.foo.bar/status
293 ;   http://www.foo.bar/status?json
294 ;   http://www.foo.bar/status?html
295 ;   http://www.foo.bar/status?xml
296 ;
297 ; By default the status page only outputs short status. Passing 'full' in the
298 ; query string will also return status for each pool process.
299 ; Example: 
300 ;   http://www.foo.bar/status?full
301 ;   http://www.foo.bar/status?json&full
302 ;   http://www.foo.bar/status?html&full
303 ;   http://www.foo.bar/status?xml&full
304 ; The Full status returns for each process:
305 ;   pid                  - the PID of the process;
306 ;   state                - the state of the process (Idle, Running, ...);
307 ;   start time           - the date and time the process has started;
308 ;   start since          - the number of seconds since the process has started;
309 ;   requests             - the number of requests the process has served;
310 ;   request duration     - the duration in µs of the requests;
311 ;   request method       - the request method (GET, POST, ...);
312 ;   request URI          - the request URI with the query string;
313 ;   content length       - the content length of the request (only with POST);
314 ;   user                 - the user (PHP_AUTH_USER) (or '-' if not set);
315 ;   script               - the main script called (or '-' if not set);
316 ;   last request cpu     - the %cpu the last request consumed
317 ;                          it's always 0 if the process is not in Idle state
318 ;                          because CPU calculation is done when the request
319 ;                          processing has terminated;
320 ;   last request memory  - the max amount of memory the last request consumed
321 ;                          it's always 0 if the process is not in Idle state
322 ;                          because memory calculation is done when the request
323 ;                          processing has terminated;
324 ; If the process is in Idle state, then informations are related to the
325 ; last request the process has served. Otherwise informations are related to
326 ; the current request being served.
327 ; Example output:
328 ;   ************************
329 ;   pid:                  31330
330 ;   state:                Running
331 ;   start time:           01/Jul/2011:17:53:49 +0200
332 ;   start since:          63087
333 ;   requests:             12808
334 ;   request duration:     1250261
335 ;   request method:       GET
336 ;   request URI:          /test_mem.php?N=10000
337 ;   content length:       0
338 ;   user:                 -
339 ;   script:               /home/fat/web/docs/php/test_mem.php
340 ;   last request cpu:     0.00
341 ;   last request memory:  0
342 ;
343 ; Note: There is a real-time FPM status monitoring sample web page available
344 ;       It's available in: ${prefix}/share/fpm/status.html
345 ;
346 ; Note: The value must start with a leading slash (/). The value can be
347 ;       anything, but it may not be a good idea to use the .php extension or it
348 ;       may conflict with a real PHP file.
349 ; Default Value: not set 
350 ;pm.status_path = /status
351  
352 ; The ping URI to call the monitoring page of FPM. If this value is not set, no
353 ; URI will be recognized as a ping page. This could be used to test from outside
354 ; that FPM is alive and responding, or to
355 ; - create a graph of FPM availability (rrd or such);
356 ; - remove a server from a group if it is not responding (load balancing);
357 ; - trigger alerts for the operating team (24/7).
358 ; Note: The value must start with a leading slash (/). The value can be
359 ;       anything, but it may not be a good idea to use the .php extension or it
360 ;       may conflict with a real PHP file.
361 ; Default Value: not set
362 ;ping.path = /ping
363 
364 ; This directive may be used to customize the response of a ping request. The
365 ; response is formatted as text/plain with a 200 response code.
366 ; Default Value: pong
367 ;ping.response = pong
368 
369 ; The access log file
370 ; Default: not set
371 ;access.log = log/$pool.access.log
372 
373 ; The access log format.
374 ; The following syntax is allowed
375 ;  %%: the '%' character
376 ;  %C: %CPU used by the request
377 ;      it can accept the following format:
378 ;      - %{user}C for user CPU only
379 ;      - %{system}C for system CPU only
380 ;      - %{total}C  for user + system CPU (default)
381 ;  %d: time taken to serve the request
382 ;      it can accept the following format:
383 ;      - %{seconds}d (default)
384 ;      - %{miliseconds}d
385 ;      - %{mili}d
386 ;      - %{microseconds}d
387 ;      - %{micro}d
388 ;  %e: an environment variable (same as $_ENV or $_SERVER)
389 ;      it must be associated with embraces to specify the name of the env
390 ;      variable. Some exemples:
391 ;      - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
392 ;      - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
393 ;  %f: script filename
394 ;  %l: content-length of the request (for POST request only)
395 ;  %m: request method
396 ;  %M: peak of memory allocated by PHP
397 ;      it can accept the following format:
398 ;      - %{bytes}M (default)
399 ;      - %{kilobytes}M
400 ;      - %{kilo}M
401 ;      - %{megabytes}M
402 ;      - %{mega}M
403 ;  %n: pool name
404 ;  %o: output header
405 ;      it must be associated with embraces to specify the name of the header:
406 ;      - %{Content-Type}o
407 ;      - %{X-Powered-By}o
408 ;      - %{Transfert-Encoding}o
409 ;      - ....
410 ;  %p: PID of the child that serviced the request
411 ;  %P: PID of the parent of the child that serviced the request
412 ;  %q: the query string 
413 ;  %Q: the '?' character if query string exists
414 ;  %r: the request URI (without the query string, see %q and %Q)
415 ;  %R: remote IP address
416 ;  %s: status (response code)
417 ;  %t: server time the request was received
418 ;      it can accept a strftime(3) format:
419 ;      %d/%b/%Y:%H:%M:%S %z (default)
420 ;  %T: time the log has been written (the request has finished)
421 ;      it can accept a strftime(3) format:
422 ;      %d/%b/%Y:%H:%M:%S %z (default)
423 ;  %u: remote user
424 ;
425 ; Default: "%R - %u %t \"%m %r\" %s"
426 ;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
427  
428 ; The log file for slow requests
429 ; Default Value: not set
430 ; Note: slowlog is mandatory if request_slowlog_timeout is set
431 ;slowlog = log/$pool.log.slow
432  
433 ; The timeout for serving a single request after which a PHP backtrace will be
434 ; dumped to the 'slowlog' file. A value of '0s' means 'off'.
435 ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
436 ; Default Value: 0
437 ;request_slowlog_timeout = 0
438  
439 ; The timeout for serving a single request after which the worker process will
440 ; be killed. This option should be used when the 'max_execution_time' ini option
441 ; does not stop script execution for some reason. A value of '0' means 'off'.
442 ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
443 ; Default Value: 0
444 ;request_terminate_timeout = 0
445  
446 ; Set open file descriptor rlimit.
447 ; Default Value: system defined value
448 ;rlimit_files = 1024
449  
450 ; Set max core size rlimit.
451 ; Possible Values: 'unlimited' or an integer greater or equal to 0
452 ; Default Value: system defined value
453 ;rlimit_core = 0
454  
455 ; Chroot to this directory at the start. This value must be defined as an
456 ; absolute path. When this value is not set, chroot is not used.
457 ; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
458 ; of its subdirectories. If the pool prefix is not set, the global prefix
459 ; will be used instead.
460 ; Note: chrooting is a great security feature and should be used whenever 
461 ;       possible. However, all PHP paths will be relative to the chroot
462 ;       (error_log, sessions.save_path, ...).
463 ; Default Value: not set
464 ;chroot = 
465  
466 ; Chdir to this directory at the start.
467 ; Note: relative path can be used.
468 ; Default Value: current directory or / when chroot
469 ;chdir = /var/www
470  
471 ; Redirect worker stdout and stderr into main error log. If not set, stdout and
472 ; stderr will be redirected to /dev/null according to FastCGI specs.
473 ; Note: on highloaded environement, this can cause some delay in the page
474 ; process time (several ms).
475 ; Default Value: no
476 ;catch_workers_output = yes
477 
478 ; Clear environment in FPM workers
479 ; Prevents arbitrary environment variables from reaching FPM worker processes
480 ; by clearing the environment in workers before env vars specified in this
481 ; pool configuration are added.
482 ; Setting to "no" will make all environment variables available to PHP code
483 ; via getenv(), $_ENV and $_SERVER.
484 ; Default Value: yes
485 ;clear_env = no
486 
487 ; Limits the extensions of the main script FPM will allow to parse. This can
488 ; prevent configuration mistakes on the web server side. You should only limit
489 ; FPM to .php extensions to prevent malicious users to use other extensions to
490 ; exectute php code.
491 ; Note: set an empty value to allow all extensions.
492 ; Default Value: .php
493 ;security.limit_extensions = .php .php3 .php4 .php5
494  
495 ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
496 ; the current environment.
497 ; Default Value: clean env
498 ;env[HOSTNAME] = $HOSTNAME
499 ;env[PATH] = /usr/local/bin:/usr/bin:/bin
500 ;env[TMP] = /tmp
501 ;env[TMPDIR] = /tmp
502 ;env[TEMP] = /tmp
503 
504 ; Additional php.ini defines, specific to this pool of workers. These settings
505 ; overwrite the values previously defined in the php.ini. The directives are the
506 ; same as the PHP SAPI:
507 ;   php_value/php_flag             - you can set classic ini defines which can
508 ;                                    be overwritten from PHP call 'ini_set'. 
509 ;   php_admin_value/php_admin_flag - these directives won't be overwritten by
510 ;                                     PHP call 'ini_set'
511 ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
512 
513 ; Defining 'extension' will load the corresponding shared extension from
514 ; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
515 ; overwrite previously defined php.ini values, but will append the new value
516 ; instead.
517 
518 ; Note: path INI options can be relative and will be expanded with the prefix
519 ; (pool, global or /usr/local/php5445)
520 
521 ; Default Value: nothing is defined by default except the values in php.ini and
522 ;                specified at startup with the -d argument
523 ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
524 ;php_flag[display_errors] = off
525 ;php_admin_value[error_log] = /var/log/fpm-php.www.log
526 ;php_admin_flag[log_errors] = on
527 ;php_admin_value[memory_limit] = 32M
View Code

 

编译命令:

docker build -f docker/Dockerfile -t myphp739 . 

注意事项:

1,用于初始化的脚本my-init.sh,在windows修改之后需要,使用 convert2unix 工具转换一下,不然 因windows平台的换行符号和linux/unix不一样,导致

windows编写的.sh文件,无法在linux下正常运行。

2,最后的.号不要遗漏

3,php-7.3.9.tar.gz下载地址

https://www.php.net/downloads.php

4,libzip-1.5.1.tar.gz 的下载地址

https://libzip.org/download/

如有其他问题欢迎提问~

 

posted on 2019-10-06 13:08  立平  阅读(512)  评论(0编辑  收藏  举报

导航