Skip to content

Instantly share code, notes, and snippets.

@rokugasenpai
Last active May 9, 2017 03:37
Show Gist options
  • Save rokugasenpai/4e4e1382c289fd923e8cbf0538e4cb13 to your computer and use it in GitHub Desktop.
Save rokugasenpai/4e4e1382c289fd923e8cbf0538e4cb13 to your computer and use it in GitHub Desktop.
php.ini(PHP7.1, XAMPP, Win)を実用的な範囲でコンパクトにした
; PHP7.1.2 XAMPP Windows 2017/05/07
; Check php.ini from the command line.
; php -i | find "memory_limit"
; memory_limit => 1G => 1G
[PHP]
short_open_tag=Off
; deleted in PHP7?
;asp_tags=Off
output_buffering=4096
serialize_precision=-1
; too large?
;realpath_cache_size = 4096k
; must be On if the php file is written in SJIS
;zend.multibyte = Off
; must be SJIS if the php file is written in SJIS
;zend.script_encoding =
; only web
;max_execution_time=30
; Default Value: -1 (Unlimited)
max_input_time=60
; Default Value: 128M
memory_limit=1G
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
; Development Value: E_ALL
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
error_reporting=E_ALL
; Default Value: On
;display_errors=On
; Default Value: Off
; Development Value: On
; Production Value: Off
display_startup_errors=On
; Default Value: Off
; Development Value: On
; Production Value: On
log_errors=On
; 0 (Unlimited)
;log_errors_max_len=1024
; This setting is on by default.
report_zend_debug = 0
; Default Value: Off
; Development Value: On
; Production Value: Off
track_errors=On
; Default Value: On
; Development Value: On
; Production value: On
;html_errors=On
; Default Value: Empty
; to file
;error_log = php_errors.log
; to syslog (Event Log on Windows).
;error_log = syslog
; Default Value: "EGPCS"
; Development Value: "GPCS"
; Production Value: "GPCS";
variables_order="GPCS"
; Default Value: None
; Development Value: "GP"
; Production Value: "GP"
request_order="GP"
; Default Value: On
; Development Value: Off
; Production Value: Off
register_argc_argv=Off
; Default Value: 8M
; 0 (Unlimited)
post_max_size=8M
; Default Value: UTF-8
default_charset="UTF-8"
; If empty, default_charset is used.
;internal_encoding =
; If empty, default_charset is used.
;input_encoding =
; If empty, default_charset is used.
;output_encoding =
; UNIX: "/path1:/path2"
; Windows: "\path1;\path2"
include_path=C:\Users\USER\xampp\php\PEAR
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
doc_root=
; extension_dir = "./"
; On windows:
extension_dir="C:\Users\USER\xampp\php\ext"
; Defaults to the system default (see sys_get_temp_dir)
; sys_temp_dir = "/tmp"
; Whether or not to enable the dl() function.
; Default Value: On
enable_dl=Off
; **You CAN safely turn this off for IIS, in fact, you MUST.**
;cgi.force_redirect = 1
; Default Value: 1
;fastcgi.logging = 1
; Default Value: On
file_uploads=On
upload_tmp_dir="C:\Users\USER\xampp\tmp"
; Default Value: 2M
upload_max_filesize=2M
; Default Value: 20
max_file_uploads=20
; Default Value: 60
default_socket_timeout=60
extension=php_bz2.dll
extension=php_curl.dll
extension=php_fileinfo.dll
extension=php_ftp.dll
extension=php_gd2.dll
extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_exif.dll ; Must be after mbstring as it depends on it
extension=php_mysqli.dll
;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
;extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
;extension=php_soap.dll
;extension=php_sockets.dll
;extension=php_sqlite3.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
[CLI Server]
cli_server.color=On
[Date]
date.timezone = "Asia/Tokyo"
;date.default_latitude = 31.7667
;date.default_longitude = 35.2333
;date.sunrise_zenith = 90.583333
;date.sunset_zenith = 90.583333
[bcmath]
bcmath.scale=0
[mbstring]
mbstring.language = Japanese
;mbstring.internal_encoding =
;mbstring.http_input =
;mbstring.http_output =
;mbstring.encoding_translation = Off
;mbstring.detect_order = auto
; substitute_character used when character cannot be converted
; one from another
;mbstring.substitute_character = none
; overload(replace) single byte functions by mbstring functions.
; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
; etc. Possible values are 0,1,2,4 or combination of them.
; For example, 7 for overload everything.
; 0: No overload
; 1: Overload mail() function
; 2: Overload str*() functions
; 4: Overload ereg*() functions
; http://php.net/mbstring.func-overload
;mbstring.func_overload = 0
; enable strict encoding detection.
; Default: Off
;mbstring.strict_detection = On
; This directive specifies the regex pattern of content types for which mb_output_handler()
; is activated.
; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml)
;mbstring.http_output_conv_mimetype=
[Session]
define_syslog_variables=Off
session.save_handler=files
session.save_path="C:\Users\USER\xampp\tmp"
; Default Value: 0
; recommend 1
session.use_strict_mode=0
session.use_cookies=1
;session.cookie_secure =
session.use_only_cookies=1
; recommended change
session.name=PHPSESSID
session.auto_start=0
; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime=0
session.cookie_path=/
session.cookie_domain=
session.cookie_httponly=
session.serialize_handler=php
; Defines the probability that the 'garbage collection' process is started
; on every session initialization. The probability is calculated by using
; gc_probability/gc_divisor.
; Default Value: 1
; Development Value: 1
; Production Value: 1
session.gc_probability=1
; Default Value: 100
; Development Value: 1000
; Production Value: 1000
session.gc_divisor=1000
; After this number of seconds, stored data will be seen as 'garbage' and
; cleaned up by the garbage collection process.
session.gc_maxlifetime=1440
session.referer_check=
session.cache_limiter=nocache
session.cache_expire=180
; recommend 0
session.use_trans_sid=0
; Set session ID character length. This value could be between 22 to 256.
; Default Value: 32
; Development Value: 26
; Production Value: 26
session.sid_length=26
session.trans_sid_tags="a=href,area=href,frame=src,form="
;session.trans_sid_hosts=""
; Possible values:
; 4 (4 bits: 0-9, a-f)
; 5 (5 bits: 0-9, a-v)
; 6 (6 bits: 0-9, a-z, A-Z, "-", ",")
; Default Value: 4
; Development Value: 5
; Production Value: 5
session.sid_bits_per_character=5
; Enable upload progress tracking in $_SESSION
; Default Value: On
; Development Value: On
; Production Value: On
;session.upload_progress.enabled = On
; Cleanup the progress information as soon as all POST data has been read
; Default Value: On
; Development Value: On
; Production Value: On
;session.upload_progress.cleanup = On
; A prefix used for the upload progress key in $_SESSION
;session.upload_progress.prefix = "upload_progress_"
; The index name (concatenated with the prefix) in $_SESSION
; containing the upload progress information
;session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS"
; How frequently the upload progress should be updated.
; Given either in percentages (per-file), or in bytes
;session.upload_progress.freq = "1%"
; The minimum delay between updates, in seconds
;session.upload_progress.min_freq = "1"
; Only write session data when session data is changed. Enabled by default.
;session.lazy_write = On
[iconv]
;iconv.input_encoding =
;iconv.internal_encoding =
;iconv.output_encoding =
[SQL]
sql.safe_mode=Off
[Pdo]
pdo_mysql.default_socket="MySQL"
[Pdo_mysql]
pdo_mysql.cache_size=2000
pdo_mysql.default_socket=
[MySQLi]
; -1 means no limit.
; Default Value: -1
;mysqli.max_persistent=-1
; Default Value: On
;mysqli.allow_local_infile = On
; Default Value: On
;mysqli.allow_persistent=On
; Default Value: -1
;mysqli.max_links=-1
; If mysqlnd is used: Number of cache slots for the internal result set cache
; Default Value: 2000
;mysqli.cache_size=2000
; Default port number for mysqli_connect().
; Default Value: 3306
mysqli.default_port=3306
mysqli.default_socket=
mysqli.default_host=
mysqli.default_user=
mysqli.default_pw=
mysqli.reconnect=Off
[MySQL]
mysql.allow_local_infile=On
mysql.allow_persistent=On
mysql.cache_size=2000
mysql.max_persistent=-1
mysql.max_link=-1
mysql.default_port=3306
mysql.default_socket="MySQL"
mysql.connect_timeout=3
mysql.trace_mode=Off
[mysqlnd]
; Default Value: On
mysqlnd.collect_statistics=On
; Default Value: Off
mysqlnd.collect_memory_statistics=On
;mysqlnd.debug =
;mysqlnd.log_mask = 0
;mysqlnd.mempool_default_size = 16000
;mysqlnd.net_cmd_buffer_size = 2048
;mysqlnd.net_read_buffer_size = 32768
;mysqlnd.net_read_timeout = 31536000
;mysqlnd.sha256_server_public_key =
[sqlite3]
;sqlite3.extension_dir =
[PostgreSQL]
; Default Value: On
;pgsql.allow_persistent=On
; Default Value: Off
;pgsql.auto_reset_persistent=Off
; -1 means no limit.
; Default Value: -1
;pgsql.max_persistent=-1
; 1 means no limit.
; Default Value: -1
;pgsql.max_links=-1
; Default Value: 0
pgsql.ignore_notice=0
; Default Value: 0
;pgsql.log_notice=0
[mail function]
; For Win32 only.
SMTP=localhost
smtp_port=25
; For Win32 only.
;sendmail_from = me@example.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail().
;mail.force_extra_parameters =
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header=On
;mail.log =
; Log mail to syslog (Event Log on Windows).
;mail.log = syslog
[browscap]
browscap="C:\Users\USER\xampp\php\extras\browscap.ini"
[exif]
;exif.encode_unicode = ISO-8859-15
;exif.decode_unicode_motorola = UCS-2BE
;exif.decode_unicode_intel = UCS-2LE
;exif.encode_jis =
;exif.decode_jis_motorola = JIS
;exif.decode_jis_intel = JIS
[mcrypt]
;mcrypt.algorithms_dir=
;mcrypt.modes_dir=
[openssl]
;openssl.cafile=
;openssl.capath=
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
curl.cainfo="C:\Users\USER\xampp\apache\bin\curl-ca-bundle.crt"
[Syslog]
define_syslog_variables=Off
[Pcre]
;pcre.backtrack_limit=100000
;pcre.recursion_limit=100000
;pcre.jit=1
[Phar]
;phar.readonly = On
;phar.require_hash = On
;phar.cache_list =
[Assertion]
; Switch whether to compile assertions at all (to have no overhead at run-time)
; -1: Do not compile at all
; 0: Jump over assertion at run-time
; 1: Execute assertions
; Changing from or to a negative value is only possible in php.ini! (For turning assertions on and off at run-time, see assert.active, when zend.assertions = 1)
; Default Value: 1
; Development Value: 1
; Production Value: -1
zend.assertions=1
; Assert(expr); active by default.
;assert.active = On
; Throw an AssertationException on failed assertions
;assert.exception = On
; Issue a PHP warning for each failed assertion. (Overridden by assert.exception if active)
;assert.warning = On
; Don't bail out by default.
;assert.bail = Off
; User-function to be called if an assertion fails.
;assert.callback = 0
; Eval the expression with current error_reporting(). Set to true if you want
; error_reporting(0) around the eval().
;assert.quiet_eval = 0
[opcache]
; Determines if Zend OPCache is enabled
;opcache.enable=1
; Determines if Zend OPCache is enabled for the CLI version of PHP
;opcache.enable_cli=1
; The OPcache shared memory storage size.
;opcache.memory_consumption=128
; The amount of memory for interned strings in Mbytes.
;opcache.interned_strings_buffer=8
; The maximum number of keys (scripts) in the OPcache hash table.
; Only numbers between 200 and 100000 are allowed.
;opcache.max_accelerated_files=10000
; The maximum percentage of "wasted" memory until a restart is scheduled.
;opcache.max_wasted_percentage=5
; When this directive is enabled, the OPcache appends the current working
; directory to the script key, thus eliminating possible collisions between
; files with the same name (basename). Disabling the directive improves
; performance, but may break existing applications.
;opcache.use_cwd=1
; When disabled, you must reset the OPcache manually or restart the
; webserver for changes to the filesystem to take effect.
;opcache.validate_timestamps=1
; How often (in seconds) to check file timestamps for changes to the shared
; memory storage allocation. ("1" means validate once per second, but only
; once per request. "0" means always validate)
;opcache.revalidate_freq=2
; Enables or disables file search in include_path optimization
;opcache.revalidate_path=0
; If disabled, all PHPDoc comments are dropped from the code to reduce the
; size of the optimized code.
;opcache.save_comments=1
; If enabled, a fast shutdown sequence is used for the accelerated code
; Depending on the used Memory Manager this may cause some incompatibilities.
;opcache.fast_shutdown=0
; Allow file existence override (file_exists, etc.) performance feature.
;opcache.enable_file_override=0
; A bitmask, where each bit enables or disables the appropriate OPcache
; passes
;opcache.optimization_level=0xffffffff
;opcache.inherited_hack=1
;opcache.dups_fix=0
; The location of the OPcache blacklist file (wildcards allowed).
; Each OPcache blacklist file is a text file that holds the names of files
; that should not be accelerated. The file format is to add each filename
; to a new line. The filename may be a full path or just a file prefix
; (i.e., /var/www/x blacklists all the files and directories in /var/www
; that start with 'x'). Line starting with a ; are ignored (comments).
;opcache.blacklist_filename=
; Allows exclusion of large files from being cached. By default all files
; are cached.
;opcache.max_file_size=0
; Check the cache checksum each N requests.
; The default value of "0" means that the checks are disabled.
;opcache.consistency_checks=0
; How long to wait (in seconds) for a scheduled restart to begin if the cache
; is not being accessed.
;opcache.force_restart_timeout=180
; OPcache error_log file name. Empty string assumes "stderr".
;opcache.error_log=
; All OPcache errors go to the Web server log.
; By default, only fatal errors (level 0) or errors (level 1) are logged.
; You can also enable warnings (level 2), info messages (level 3) or
; debug messages (level 4).
;opcache.log_verbosity_level=1
; Preferred Shared Memory back-end. Leave empty and let the system decide.
;opcache.preferred_memory_model=
; Protect the shared memory from unexpected writing during script execution.
; Useful for internal debugging only.
;opcache.protect_memory=0
; Allows calling OPcache API functions only from PHP scripts which path is
; started from specified string. The default "" means no restriction
;opcache.restrict_api=
; Mapping base of shared memory segments (for Windows only). All the PHP
; processes have to map shared memory into the same address space. This
; directive allows to manually fix the "Unable to reattach to base address"
; errors.
;opcache.mmap_base=
; Enables and sets the second level cache directory.
; It should improve performance when SHM memory is full, at server restart or
; SHM reset. The default "" disables file based caching.
;opcache.file_cache=
; Enables or disables opcode caching in shared memory.
;opcache.file_cache_only=0
; Enables or disables checksum validation when script loaded from file cache.
;opcache.file_cache_consistency_checks=1
; Implies opcache.file_cache_only=1 for a certain process that failed to
; reattach to the shared memory (for Windows only). Explicitly enabled file
; cache is required.
;opcache.file_cache_fallback=1
; Enables or disables copying of PHP code (text segment) into HUGE PAGES.
; This should improve performance, but requires appropriate OS configuration.
;opcache.huge_code_pages=0
; Validate cached file permissions.
;opcache.validate_permission=0
; Prevent name collisions in chroot'ed environment.
;opcache.validate_root=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment