Commit 2828e041d5fe8e2a2f616c04a5e1e3cbc054bc03

Authored by root ago
0 parents
Exists in master

web dev server image has built

Showing 17 changed files with 2220 additions and 0 deletions Side-by-side Diff

... ... @@ -0,0 +1,21 @@
  1 +Hello!
  2 +
  3 +This is Arnold(arnold@pikicast.com).
  4 +
  5 +Deploy your server as you want with below steps.
  6 +
  7 +1. install puppet
  8 +$ sudo sh install.sh
  9 +
  10 +2. select which server you want
  11 +$ ls manifest
  12 +$ sudo puppet apply [*.pp file path] --modulepath=[module path] $*
  13 +
  14 +3. that's all
  15 +
  16 +Port Policy
  17 +
  18 +NGINX : 80
  19 +HAPROXY : 8000
  20 +FPM : 9000
  21 +
... ... @@ -0,0 +1,9 @@
  1 +#!/bin/sh
  2 +rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm
  3 +yum install puppet
  4 +puppet resource package puppet ensure=latest
  5 +
  6 +puppet module install jfryman-nginx
  7 +puppet module install puppetlabs-vcsrepo
  8 +puppet module install puppetlabs-stdlib
  9 +puppet module install puppetlabs-haproxy
manifests/bmt-server.pp View file @ 2828e04
... ... @@ -0,0 +1,29 @@
  1 +node 'localhost' {
  2 + include nginx
  3 + include haproxy
  4 + include php
  5 +
  6 + file { '/etc/nginx/nginx.conf':
  7 + source => 'puppet:///modules/nginx/nginx.conf.webproxy.dev',
  8 + }
  9 +
  10 + file { '/etc/nginx/conf.d/http.conf':
  11 + source => 'puppet:///modules/nginx/http.conf.webproxy.dev',
  12 + }
  13 +
  14 + file { '/etc/nginx/fastcgi.conf':
  15 + source => 'puppet:///modules/nginx/fastcgi.conf.webproxy.dev',
  16 + }
  17 +
  18 + file { '/etc/haproxy/haproxy.cfg':
  19 + source => 'puppet:///modules/haproxy/haproxy.cfg.webproxy.dev',
  20 + }
  21 +
  22 + file { '/etc/php-fpm.d/www.conf':
  23 + source => 'puppet:///modules/php/www.conf.webserver.dev',
  24 + }
  25 +
  26 + file { '/etc/php.ini':
  27 + source => 'puppet:///modules/php/php.ini.webserver.dev',
  28 + }
  29 +}
manifests/web-proxy.pp View file @ 2828e04
... ... @@ -0,0 +1,4 @@
  1 +node 'localhost' {
  2 + include nginx
  3 + include haproxy
  4 +}
manifests/web-server.pp View file @ 2828e04
... ... @@ -0,0 +1,3 @@
  1 +node 'localhost' {
  2 + include php
  3 +}
modules/haproxy/files/haproxy.cfg.webproxy.dev View file @ 2828e04
... ... @@ -0,0 +1,43 @@
  1 +#---------------------------------------------------------------------
  2 +# This configureation is based on
  3 +# NGINX - HARROXY - PHP-FPM(*) architecture.
  4 +# Logging has turned off because of disk io performance.
  5 +#
  6 +# Contact me for more details.
  7 +# arnold@pikicast.com
  8 +#---------------------------------------------------------------------
  9 +
  10 +global
  11 + chroot /var/lib/haproxy
  12 + pidfile /var/run/haproxy.pid
  13 + maxconn 10000
  14 + user haproxy
  15 + group haproxy
  16 + daemon
  17 +
  18 + stats socket /var/lib/haproxy/stats
  19 + tune.sll.default-dh-param 2048
  20 +
  21 +defaults
  22 + retries 1
  23 + timeout connect 300s
  24 + timeout client 1m
  25 + timeout server 5000
  26 + timeout check 10s
  27 + options dontlognull
  28 +
  29 +listen pikicast-web
  30 + bind *:8000
  31 + balance roundrobin
  32 + mode tcp
  33 + option redispatch
  34 + option httpclose
  35 +
  36 + server kr-web-test-01 localhost:9000 check cookie kr-web-test-01
  37 +
  38 +listen stats:2080
  39 + mode http
  40 + stats enable
  41 + stats uri /
  42 + stats realm Strictly\ Private
  43 + stats auth haproxy:youlike123
modules/haproxy/files/haproxy.cfg.webproxy.real View file @ 2828e04
... ... @@ -0,0 +1,44 @@
  1 +#---------------------------------------------------------------------
  2 +# This configureation is based on
  3 +# NGINX - HARROXY - PHP-FPM(*) architecture.
  4 +# Logging has turned off because of disk io performance.
  5 +#
  6 +# Contact me for more details.
  7 +# arnold@pikicast.com
  8 +#---------------------------------------------------------------------
  9 +
  10 +global
  11 + chroot /var/lib/haproxy
  12 + pidfile /var/run/haproxy.pid
  13 + maxconn 10000
  14 + user haproxy
  15 + group haproxy
  16 + daemon
  17 +
  18 + stats socket /var/lib/haproxy/stats
  19 + tune.sll.default-dh-param 2048
  20 +
  21 +defaults
  22 + retries 1
  23 + timeout connect 300s
  24 + timeout client 1m
  25 + timeout server 5000
  26 + timeout check 10s
  27 + options dontlognull
  28 +
  29 +listen pikicast-web
  30 + bind *:80
  31 + balance roundrobin
  32 + mode tcp
  33 + option redispatch
  34 + option httpclose
  35 +
  36 + server kr-web-01 192.168.100.51:9000 check cookie kr-web-01
  37 + server kr-web-02 192.168.100.52:9000 check cookie kr-web-02
  38 +
  39 +listen stats:2080
  40 + mode http
  41 + stats enable
  42 + stats uri /
  43 + stats realm Strictly\ Private
  44 + stats auth haproxy:youlike123
modules/haproxy/manifests/init.pp View file @ 2828e04
... ... @@ -0,0 +1,11 @@
  1 +class haproxy {
  2 + package { 'haproxy':
  3 + ensure => installed,
  4 + }
  5 +
  6 + service { 'haproxy':
  7 + ensure => running,
  8 + enable => true,
  9 + require => Package['haproxy']
  10 + }
  11 +}
modules/nginx/files/fastcgi.conf.webproxy.dev View file @ 2828e04
... ... @@ -0,0 +1,23 @@
  1 +fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  2 +fastcgi_param QUERY_STRING $query_string;
  3 +fastcgi_param REQUEST_METHOD $request_method;
  4 +fastcgi_param CONTENT_TYPE $content_type;
  5 +fastcgi_param CONTENT_LENGTH $content_length;
  6 +
  7 +fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  8 +fastcgi_param REQUEST_URI $request_uri;
  9 +fastcgi_param DOCUMENT_URI $document_uri;
  10 +fastcgi_param DOCUMENT_ROOT $document_root;
  11 +fastcgi_param SERVER_PROTOCOL $server_protocol;
  12 +
  13 +fastcgi_param GATEWAY_INTERFACE CGI/1.1;
  14 +fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
  15 +
  16 +fastcgi_param REMOTE_ADDR $remote_addr;
  17 +fastcgi_param REMOTE_PORT $remote_port;
  18 +fastcgi_param SERVER_ADDR $server_addr;
  19 +fastcgi_param SERVER_PORT $server_port;
  20 +fastcgi_param SERVER_NAME $server_name;
  21 +
  22 +# PHP only, required if PHP was built with --enable-force-cgi-redirect
  23 +fastcgi_param REDIRECT_STATUS 200;
modules/nginx/files/http.conf.webproxy.dev View file @ 2828e04
... ... @@ -0,0 +1,24 @@
  1 +server {
  2 + listen 80;
  3 + sever_name emotion.pikicast.com;
  4 +
  5 + root /var/www/pikicast-web-ci;
  6 + index index.html index.php;
  7 +
  8 + location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {
  9 + expires max;
  10 + log_not_found off;
  11 + }
  12 +
  13 + location / {
  14 + try_files $uri $uri/ /index.php;
  15 + }
  16 +
  17 + location ~* \.php$ {
  18 + fastcgi_pass 127.0.0.1:8000;
  19 + include fastcgi.conf;
  20 + fastcgi_index index.php;
  21 + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  22 + include fastcgi_params;
  23 + }
  24 +}
modules/nginx/files/nginx.conf.webproxy.dev View file @ 2828e04
... ... @@ -0,0 +1,34 @@
  1 +#---------------------------------------------------------------------
  2 +# This configuration is based on
  3 +# NGINX - HAPROXY - PHP-FPM(*) architecture.
  4 +# Please contact me for more details.
  5 +#
  6 +# arnold@pikicast.com
  7 +#---------------------------------------------------------------------
  8 +
  9 +user nginx;
  10 +worker_processes 1;
  11 +
  12 +error_log /var/log/nginx/error.log warn;
  13 +
  14 +pid /var/run/nginx.pid;
  15 +
  16 +events {
  17 + worker_connections 1024;
  18 +}
  19 +
  20 +http {
  21 + include /etc/nginx/mime.types;
  22 + default_type application/octet-stream;
  23 +
  24 + log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  25 + '$status $body_bytes_sent "$http_referer" '
  26 + '"$http_user_agent" "$http_x_forwarded_for"';
  27 +
  28 + access_log /var/log/nginx/access.log json_format;
  29 + sendfile on;
  30 +
  31 + keepalive_timeout 65;
  32 +
  33 + include /etc/nginx/conf.d/*.conf;
  34 +}
modules/nginx/files/nginx.conf.webproxy.real View file @ 2828e04
... ... @@ -0,0 +1,62 @@
  1 +#---------------------------------------------------------------------
  2 +# This configuration is based on
  3 +# NGINX - HAPROXY - PHP-FPM(*) architecture.
  4 +# Please contact me for more details.
  5 +#
  6 +# arnold@pikicast.com
  7 +#---------------------------------------------------------------------
  8 +
  9 +user nginx;
  10 +worker_processes 4;
  11 +
  12 +#http://www.gnupit.net/book/workerrlimitnofile
  13 +worker_rlimit_nofile 65536;
  14 +
  15 +error_log /var/log/nginx/error.log warn;
  16 +
  17 +pid /var/run/nginx.pid;
  18 +
  19 +events {
  20 + worker_connections 2048;
  21 +}
  22 +
  23 +http {
  24 + include /etc/nginx/mime.types;
  25 + default_type application/octet-stream;
  26 +
  27 + log_format main '[$time_local] "$request" $status $upstream_cache_status';
  28 +
  29 + proxy_cache_path /tmp/cache levels=1:2 keys_zone=pikicast:512m max_size=1G inactive=60m;
  30 +
  31 + log_format json_format '{ "@time": "$time_iso8601", '
  32 + '"@fields": { '
  33 + '"country": "$http_cf_ipcountry", '
  34 + '"ip": "$remote_addr", '
  35 + '"status": "$status", '
  36 + '"cache-status": "$upstream_cache_status", '
  37 + '"request": "$request", '
  38 + '"size": "$body_bytes_sent", '
  39 + '"user-agent": "$http_user_agent", '
  40 + '"referrer": "$http_referer" } }';
  41 +
  42 + access_log /var/log/nginx/access.log json_format;
  43 + sendfile on;
  44 + keepalive_timeout 30;
  45 +
  46 + server {
  47 + listen 80;
  48 + server_name web-nginx;
  49 +
  50 + location / {
  51 + proxy_pass http://127.0.0.1:10080;
  52 + proxy_pass_request_headers on;
  53 + }
  54 + }
  55 +
  56 + server {
  57 + listen 443;
  58 + location / {
  59 + proxy_pass http://localhost:19443;
  60 + }
  61 + }
  62 +}
modules/nginx/manifests/init.pp View file @ 2828e04
... ... @@ -0,0 +1,11 @@
  1 +class nginx {
  2 + package { 'nginx':
  3 + ensure => installed,
  4 + }
  5 +
  6 + service { 'nginx':
  7 + ensure => running,
  8 + enable => true,
  9 + require => Package['nginx']
  10 + }
  11 +}
modules/php/files/php.ini.webserver.dev View file @ 2828e04
Diff suppressed. Click to show
... ... @@ -0,0 +1,1659 @@
  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 = On
  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