
ついに、PHPのシステムの正体を暴きます!!
上のリンク先の作業の続きをこちらに投稿してます。
質問
;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;
; Enable the PHP scripting language engine under Apache.
; https://php.net/engine
engine = On
; This directive determines whether or not PHP will recognize code between
; <? and ?> tags as PHP source which should be processed as such. It is
; generally recommended that <?php and ?> should be used and that this feature
; should be disabled, as enabling it may result in issues when generating XML
; documents, however this remains supported for backward compatibility reasons.
; Note that this directive does not control the <?= shorthand tag, which can be
; used regardless of this directive.
; Default Value: On
; Development Value: Off
; Production Value: Off
; https://php.net/short-open-tag
short_open_tag = Off
; The number of significant digits displayed in floating point numbers.
; https://php.net/precision
precision = 14
; Output buffering is a mechanism for controlling how much output data
; (excluding headers and cookies) PHP should keep internally before pushing that
; data to the client. If your application's output exceeds this setting, PHP
; will send that data in chunks of roughly the size you specify.
; Turning on this setting and managing its maximum buffer size can yield some
; interesting side-effects depending on your application and web server.
; You may be able to send headers and cookies after you've already sent output
; through print or echo. You also may see performance benefits if your server is
; emitting less packets due to buffered output versus PHP streaming the output
; as it gets it. On production servers, 4096 bytes is a good setting for performance
; reasons.
; Note: Output buffering can also be controlled via Output Buffering Control
; functions.
; Possible Values:
; On = Enabled and buffer is unlimited. (Use with caution)
; Off = Disabled
; Integer = Enables the buffer and sets its maximum size in bytes.
; Note: This directive is hardcoded to Off for the CLI SAPI
; Default Value: Off
; Development Value: 4096
; Production Value: 4096
; https://php.net/output-buffering
output_buffering = 4096
; You can redirect all of the output of your scripts to a function. For
; example, if you set output_handler to "mb_output_handler", character
; encoding will be transparently converted to the specified encoding.
; Setting any output handler automatically turns on output buffering.
; Note: People who wrote portable scripts should not depend on this ini
; directive. Instead, explicitly set the output handler using ob_start().
; Using this ini directive may cause problems unless you know what script
; is doing.
; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler"
; and you cannot use both "ob_gzhandler" and "zlib.output_compression".
; Note: output_handler must be empty if this is set 'On' !!!!
; Instead you must use zlib.output_handler.
; https://php.net/output-handler
;output_handler =
; URL rewriter function rewrites URL on the fly by using
; output buffer. You can set target tags by this configuration.
; "form" tag is special tag. It will add hidden input tag to pass values.
; Refer to session.trans_sid_tags for usage.
; Default Value: "form="
; Development Value: "form="
; Production Value: "form="
;url_rewriter.tags
; URL rewriter will not rewrite absolute URL nor form by default. To enable
; absolute URL rewrite, allowed hosts must be defined at RUNTIME.
; Refer to session.trans_sid_hosts for more details.
; Default Value: ""
; Development Value: ""
; Production Value: ""
;url_rewriter.hosts
; Transparent output compression using the zlib library
; Valid values for this option are 'off', 'on', or a specific buffer size
; to be used for compression (default is 4KB)
; Note: Resulting chunk size may vary due to nature of compression. PHP
; outputs chunks that are few hundreds bytes each as a result of
; compression. If you prefer a larger chunk size for better
; performance, enable output_buffering in addition.
; Note: You need to use zlib.output_handler instead of the standard
; output_handler, or otherwise the output will be corrupted.
; https://php.net/zlib.output-compression
zlib.output_compression = Off
; https://php.net/zlib.output-compression-level
;zlib.output_compression_level = -1
; You cannot specify additional output handlers if zlib.output_compression
; is activated here. This setting does the same as output_handler but in
; a different order.
; https://php.net/zlib.output-handler
;zlib.output_handler =
; Implicit flush tells PHP to tell the output layer to flush itself
; automatically after every output block. This is equivalent to calling the
; PHP function flush() after each and every call to print() or echo() and each
; and every HTML block. Turning this option on has serious performance
; implications and is generally recommended for debugging purposes only.
; https://php.net/implicit-flush
; Note: This directive is hardcoded to On for the CLI SAPI
implicit_flush = Off
; The unserialize callback function will be called (with the undefined class'
; name as parameter), if the unserializer finds an undefined class
; which should be instantiated. A warning appears if the specified function is
; not defined, or if the function doesn't include/implement the missing class.
; So only set this entry, if you really want to implement such a
; callback-function.
unserialize_callback_func =
; The unserialize_max_depth specifies the default depth limit for unserialized
; structures. Setting the depth limit too high may result in stack overflows
; during unserialization. The unserialize_max_depth ini setting can be
; overridden by the max_depth option on individual unserialize() calls.
; A value of 0 disables the depth limit.
;unserialize_max_depth = 4096
; When floats & doubles are serialized, store serialize_precision significant
; digits after the floating point. The default value ensures that when floats
; are decoded with unserialize, the data will remain the same.
; The value is also used for json_encode when encoding double values.
; If -1 is used, then dtoa mode 0 is used which automatically select the best
; precision.
serialize_precision = -1
; open_basedir, if set, limits all file operations to the defined directory
; and below. This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file.
; Note: disables the realpath cache
; https://php.net/open-basedir
;open_basedir =
; This directive allows you to disable certain functions.
; It receives a comma-delimited list of function names.
; https://php.net/disable-functions
disable_functions =
; This directive allows you to disable certain classes.
; It receives a comma-delimited list of class names.
; https://php.net/disable-classes
disable_classes =
; Colors for Syntax Highlighting mode. Anything that's acceptable in
; <span style="color: ???????"> would work.
; https://php.net/syntax-highlighting
;highlight.string = #DD0000
;highlight.comment = #FF9900
;highlight.keyword = #007700
;highlight.default = #0000BB
;highlight.html = #000000
; If enabled, the request will be allowed to complete even if the user aborts
; the request. Consider enabling it if executing long requests, which may end up
; being interrupted by the user or a browser timing out. PHP's default behavior
; is to disable this feature.
; https://php.net/ignore-user-abort
;ignore_user_abort = On
; Determines the size of the realpath cache to be used by PHP. This value should
; be increased on systems where PHP opens many files to reflect the quantity of
; the file operations performed.
; Note: if open_basedir is set, the cache is disabled
; https://php.net/realpath-cache-size
;realpath_cache_size = 4096k
; Duration of time, in seconds for which to cache realpath information for a given
; file or directory. For systems with rarely changing files, consider increasing this
; value.
; https://php.net/realpath-cache-ttl
;realpath_cache_ttl = 120
; Enables or disables the circular reference collector.
; https://php.net/zend.enable-gc
zend.enable_gc = On
; If enabled, scripts may be written in encodings that are incompatible with
; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such
; encodings. To use this feature, mbstring extension must be enabled.
;zend.multibyte = Off
; Allows to set the default encoding for the scripts. This value will be used
; unless "declare(encoding=...)" directive appears at the top of the script.
; Only affects if zend.multibyte is set.
;zend.script_encoding =
; Allows to include or exclude arguments from stack traces generated for exceptions.
; In production, it is recommended to turn this setting on to prohibit the output
; of sensitive information in stack traces
; Default Value: Off
; Development Value: Off
; Production Value: On
zend.exception_ignore_args = On
; Allows setting the maximum string length in an argument of a stringified stack trace
; to a value between 0 and 1000000.
; This has no effect when zend.exception_ignore_args is enabled.
; Default Value: 15
; Development Value: 15
; Production Value: 0
; In production, it is recommended to set this to 0 to reduce the output
; of sensitive information in stack traces.
zend.exception_string_param_max_len = 0
189~399行目の解説をお願いします。
回答
以下は、`php.ini` ファイルの行 189~399 の解説です。この部分は、PHPの言語オプションと一部のクォリティオブライフやセキュリティ指向の設定に関する指示を含んでいます。
### Language Options セクション
このセクションは、PHP言語の基本的な動作を制御するオプションが含まれています。
#### engine
- **説明:** PHPスクリプトエンジンを有効にします。Apacheサーバ上で動作します。
- **設定例:** `engine = On`
#### short_open_tag
- **説明:** `<?` と `?>` タグのPHPコードとしての認識を制御します。推奨されていないため、オフにするのが一般的です。
- **設定例:** `short_open_tag = Off`
#### precision
- **説明:** 浮動小数点数の表示に使用する有効桁数を決定します。
- **設定例:** `precision = 14`
### Output Buffering 設定
#### output_buffering
- **説明:** 出力バッファリングを有効にし、その最大バッファサイズを設定します。
- **設定例:** `output_buffering = 4096`
#### output_handler
- **説明:** スクリプトの出力を関数にリダイレクトします。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `output_handler = "some_handler_function"`
### URL Rewriter 設定
#### url_rewriter.tags
- **説明:** URLリライタが飛び出すターゲットタグを設定します。
- **設定例:** `url_rewriter.tags = "form="`
#### url_rewriter.hosts
- **説明:** 絶対URLの書き換えを許可するホストを設定します。
- **設定例:** `url_rewriter.hosts = ""`
### zlib 設定
#### zlib.output_compression
- **説明:** zlibライブラリを使用した出力圧縮を有効にします。
- **設定例:** `zlib.output_compression = Off`
#### zlib.output_compression_level
- **説明:** 出力圧縮のレベルを設定します。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `zlib.output_compression_level = -1`
### Implicit Flush 設定
#### implicit_flush
- **説明:** すべての出力ブロック後に自動的に出力レイヤーをフラッシュするかどうかを決定します。これはデバッグのみに推奨されます。
- **設定例:** `implicit_flush = Off`
### Unserialize 設定
#### unserialize_callback_func
- **説明:** 未定義のクラスをアンシリアライズする際に呼び出されるコールバック関数を設定します。
- **設定例:** `unserialize_callback_func =`
#### unserialize_max_depth
- **説明:** アンシリアライズされた構造のデフォルト深度制限を設定します。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `unserialize_max_depth = 4096`
#### serialize_precision
- **説明:** 浮動小数点数のシリアライズに使用する有効桁数を設定します。
- **設定例:** `serialize_precision = -1`
### ファイルシステム制限
#### open_basedir
- **説明:** 設定されたディレクトリ内およびその下位ディレクトリにファイル操作を制限します。
- **設定例:** `open_basedir =`
### 機能制限
#### disable_functions
- **説明:** 無効にする関数のリストを設定します。
- **設定例:** `disable_functions =`
#### disable_classes
- **説明:** 無効にするクラスのリストを設定します。
- **設定例:** `disable_classes =`
### Syntax Highlighting 設定
このセクションは、PHPのシンタックスハイライトの配色を設定するためのオプションです。
#### highlight.string
- **説明:** 文字列のハイライト色を設定します。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `highlight.string = #DD0000`
#### highlight.comment
- **説明:** コメントのハイライト色を設定します。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `highlight.comment = #FF9900`
### その他の設定
#### ignore_user_abort
- **説明:** ユーザーがリクエストを中止した場合でもスクリプトの実行を続行するかどうかを決定します。
- **設定例:** `ignore_user_abort = On`
#### realpath_cache_size
- **説明:** PHPが使用するrealpathキャッシュのサイズを設定します。
- **設定例:** `realpath_cache_size = 4096k`
#### realpath_cache_ttl
- **説明:** ファイルやディレクトリのrealpath情報をキャッシュする時間を秒単位で設定します。
- **設定例:** `realpath_cache_ttl = 120`
### Zend 設定
#### zend.enable_gc
- **説明:** 円環参照ガベージコレクタを有効にするかどうかを決定します。
- **設定例:** `zend.enable_gc = On`
#### zend.multibyte
- **説明:** マルチバイトエンコーディングのスクリプトを許可するかどうかを決定します。
- **設定例:** `zend.multibyte = Off`
#### zend.script_encoding
- **説明:** スクリプトのデフォルトエンコーディングを設定します。
- **設定例:** `zend.script_encoding =`
#### zend.exception_ignore_args
- **説明:** スタックトレースに引数を含めるかどうかを決定します。本番環境ではオンにすることが推奨されます。
- **設定例:** `zend.exception_ignore_args = On`
#### zend.exception_string_param_max_len
- **説明:** スタックトレースの引数の最大文字数を設定します。`zend.exception_ignore_args` が有効な場合には影響を与えません。
- **設定例:** `zend.exception_string_param_max_len = 0`
これらの設定は、PHPの動作やパフォーマンス、セキュリティに大きな影響を与えるため、環境や用途に応じて適切に設定することが重要です。
質問
;;;;;;;;;;;;;;;;;
; Miscellaneous ;
;;;;;;;;;;;;;;;;;
; Decides whether PHP may expose the fact that it is installed on the server
; (e.g. by adding its signature to the Web server header). It is no security
; threat in any way, but it makes it possible to determine whether you use PHP
; on your server or not.
; https://php.net/expose-php
expose_php = Off
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
; Maximum execution time of each script, in seconds
; https://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 30
; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; https://php.net/max-input-time
max_input_time = 60
; Maximum input variable nesting level
; https://php.net/max-input-nesting-level
;max_input_nesting_level = 64
; How many GET/POST/COOKIE input variables may be accepted
;max_input_vars = 1000
; How many multipart body parts (combined input variable and file uploads) may
; be accepted.
; Default Value: -1 (Sum of max_input_vars and max_file_uploads)
;max_multipart_body_parts = 1500
; Maximum amount of memory a script may consume
; https://php.net/memory-limit
memory_limit = 128M
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; This directive informs PHP of which errors, warnings and notices you would like
; it to take action for. The recommended way of setting values for this
; directive is through the use of the error level constants and bitwise
; operators. The error level constants are below here for convenience as well as
; some common settings and their meanings.
; By default, PHP is set to take action on all errors, notices and warnings EXCEPT
; those related to E_NOTICE and E_STRICT, which together cover best practices and
; recommended coding standards in PHP. For performance reasons, this is the
; recommend error reporting setting. Your production server shouldn't be wasting
; resources complaining about best practices and coding standards. That's what
; development servers and development settings are for.
; Note: The php.ini-development file has this setting as E_ALL. This
; means it pretty much reports everything which is exactly what you want during
; development and early testing.
;
; Error Level Constants:
; E_ALL - All errors and warnings
; E_ERROR - fatal run-time errors
; E_RECOVERABLE_ERROR - almost fatal run-time errors
; E_WARNING - run-time warnings (non-fatal errors)
; E_PARSE - compile-time parse errors
; E_NOTICE - run-time notices (these are warnings which often result
; from a bug in your code, but it's possible that it was
; intentional (e.g., using an uninitialized variable and
; relying on the fact it is automatically initialized to an
; empty string)
; E_STRICT - run-time notices, enable to have PHP suggest changes
; to your code which will ensure the best interoperability
; and forward compatibility of your code
; E_CORE_ERROR - fatal errors that occur during PHP's initial startup
; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's
; initial startup
; E_COMPILE_ERROR - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; E_USER_ERROR - user-generated error message
; E_USER_WARNING - user-generated warning message
; E_USER_NOTICE - user-generated notice message
; E_DEPRECATED - warn about code that will not work in future versions
; of PHP
; E_USER_DEPRECATED - user-generated deprecation warnings
;
; Common Values:
; E_ALL (Show all errors, warnings and notices including coding standards.)
; E_ALL & ~E_NOTICE (Show all errors, except for notices)
; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.)
; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors)
; Default Value: E_ALL
; Development Value: E_ALL
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
; https://php.net/error-reporting
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
; This directive controls whether or not and where PHP will output errors,
; notices and warnings too. Error output is very useful during development, but
; it could be very dangerous in production environments. Depending on the code
; which is triggering the error, sensitive information could potentially leak
; out of your application such as database usernames and passwords or worse.
; For production environments, we recommend logging errors rather than
; sending them to STDOUT.
; Possible Values:
; Off = Do not display any errors
; stderr = Display errors to STDERR (affects only CGI/CLI binaries!)
; On or stdout = Display errors to STDOUT
; Default Value: On
; Development Value: On
; Production Value: Off
; https://php.net/display-errors
display_errors = Off
; The display of errors which occur during PHP's startup sequence are handled
; separately from display_errors. We strongly recommend you set this to 'off'
; for production servers to avoid leaking configuration details.
; Default Value: On
; Development Value: On
; Production Value: Off
; https://php.net/display-startup-errors
display_startup_errors = Off
; Besides displaying errors, PHP can also log errors to locations such as a
; server-specific log, STDERR, or a location specified by the error_log
; directive found below. While errors should not be displayed on productions
; servers they should still be monitored and logging is a great way to do that.
; Default Value: Off
; Development Value: On
; Production Value: On
; https://php.net/log-errors
log_errors = On
; Do not log repeated messages. Repeated errors must occur in same file on same
; line unless ignore_repeated_source is set true.
; https://php.net/ignore-repeated-errors
ignore_repeated_errors = Off
; Ignore source of message when ignoring repeated messages. When this setting
; is On you will not log errors with repeated messages from different files or
; source lines.
; https://php.net/ignore-repeated-source
ignore_repeated_source = Off
; If this parameter is set to Off, then memory leaks will not be shown (on
; stdout or in the log). This is only effective in a debug compile, and if
; error reporting includes E_WARNING in the allowed list
; https://php.net/report-memleaks
report_memleaks = On
; This setting is off by default.
;report_zend_debug = 0
; Turn off normal error reporting and emit XML-RPC error XML
; https://php.net/xmlrpc-errors
;xmlrpc_errors = 0
; An XML-RPC faultCode
;xmlrpc_error_number = 0
; When PHP displays or logs an error, it has the capability of formatting the
; error message as HTML for easier reading. This directive controls whether
; the error message is formatted as HTML or not.
; Note: This directive is hardcoded to Off for the CLI SAPI
; https://php.net/html-errors
;html_errors = On
; If html_errors is set to On *and* docref_root is not empty, then PHP
; produces clickable error messages that direct to a page describing the error
; or function causing the error in detail.
; You can download a copy of the PHP manual from https://php.net/docs
; and change docref_root to the base URL of your local copy including the
; leading '/'. You must also specify the file extension being used including
; the dot. PHP's default behavior is to leave these settings empty, in which
; case no links to documentation are generated.
; Note: Never use this feature for production boxes.
; https://php.net/docref-root
; Examples
;docref_root = "/phpmanual/"
; https://php.net/docref-ext
;docref_ext = .html
; String to output before an error message. PHP's default behavior is to leave
; this setting blank.
; https://php.net/error-prepend-string
; Example:
;error_prepend_string = "<span style='color: #ff0000'>"
; String to output after an error message. PHP's default behavior is to leave
; this setting blank.
; https://php.net/error-append-string
; Example:
;error_append_string = "</span>"
; Log errors to specified file. PHP's default behavior is to leave this value
; empty.
; https://php.net/error-log
; Example:
;error_log = php_errors.log
; Log errors to syslog (Event Log on Windows).
;error_log = syslog
; The syslog ident is a string which is prepended to every message logged
; to syslog. Only used when error_log is set to syslog.
;syslog.ident = php
; The syslog facility is used to specify what type of program is logging
; the message. Only used when error_log is set to syslog.
;syslog.facility = user
; Set this to disable filtering control characters (the default).
; Some loggers only accept NVT-ASCII, others accept anything that's not
; control characters. If your logger accepts everything, then no filtering
; is needed at all.
; Allowed values are:
; ascii (all printable ASCII characters and NL)
; no-ctrl (all characters except control characters)
; all (all characters)
; raw (like "all", but messages are not split at newlines)
; https://php.net/syslog.filter
;syslog.filter = ascii
;windows.show_crt_warning
; Default value: 0
; Development value: 0
; Production value: 0
401~632行目の解説をお願いします。
回答
以下は、`php.ini` ファイルの行 401~632 の解説です。この部分は主に、PHPの多様な設定とリソース制限およびエラーハンドリングとログの設定に関するオプションを含んでいます。
### Miscellaneous セクション
#### expose_php
- **説明:** PHPがサーバにインストールされていることを公開するかどうかを決定します(例:Webサーバのヘッダーに追加する)。
- **設定例:** `expose_php = Off`
- **追加情報:** セキュリティ上の脅威ではありませんが、PHPを使用していることが分かるようになります。
### Resource Limits セクション
#### max_execution_time
- **説明:** 各スクリプトの最大実行時間を秒単位で設定します。
- **設定例:** `max_execution_time = 30`
- **追加情報:** CLI SAPIではこのディレクティブは 0 にハードコードされています。
#### max_input_time
- **説明:** 各スクリプトがリクエストデータを解析するために許可される最大時間を設定します。生産環境では制限することが推奨されます。
- **設定例:** `max_input_time = 60`
- **デフォルト:** 無制限(-1)
#### max_input_nesting_level
- **説明:** 入力変数のネストレベルの最大レベルを設定します。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `max_input_nesting_level = 64`
#### max_input_vars
- **説明:** GET/POST/COOKIE 変数の最大数を設定します。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `max_input_vars = 1000`
#### max_multipart_body_parts
- **説明:** 受け入れ可能なマルチパートボディ部品(入力変数とファイルアップロードの合計)の最大数を設定します。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `max_multipart_body_parts = 1500`
#### memory_limit
- **説明:** スクリプトが消費できる最大メモリ量を設定します。
- **設定例:** `memory_limit = 128M`
### Error Handling and Logging セクション
#### error_reporting
- **説明:** PHPがどのエラー、警告、通知に対してアクションを取るかを決定します。開発環境と本番環境で異なるセットアップをすることが推奨されます。
- **設定例:** `error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT`
#### display_errors
- **説明:** エラー、警告、通知を標準出力に表示するかどうかを決定します。本番環境ではオフにすることが強く推奨されます。
- **設定例:** `display_errors = Off`
#### display_startup_errors
- **説明:** PHPの起動シーケンス中に発生するエラーを表示するかどうかを決定します。本番環境ではオフにすることを強く推奨されます。
- **設定例:** `display_startup_errors = Off`
#### log_errors
- **説明:** エラーをログに記録するかどうかを決定します。本番環境では、表示する代わりにログに記録することが推奨されます。
- **設定例:** `log_errors = On`
#### ignore_repeated_errors
- **説明:** 同じエラーメッセージを繰り返しログに記録するかどうかを決定します。
- **設定例:** `ignore_repeated_errors = Off`
#### ignore_repeated_source
- **説明:** 異なるソースや行からの繰り返されるエラーメッセージを無視するかどうかを決定します。
- **設定例:** `ignore_repeated_source = Off`
#### report_memleaks
- **説明:** メモリリークをレポートするかどうかを決定します。デバッグコンパイルでのみ有効です。
- **設定例:** `report_memleaks = On`
#### report_zend_debug
- **説明:** 通常のエラーレポートをオフにして、XML-RPCエラーXMLを発行します。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `report_zend_debug = 0`
#### xmlrpc_errors
- **説明:** XML-RPCエラーを有効または無効にします。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `xmlrpc_errors = 0`
#### xmlrpc_error_number
- **説明:** XML-RPC faultCodeを設定します。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `xmlrpc_error_number = 0`
#### html_errors
- **説明:** PHPがエラーメッセージをHTML形式で出力するかどうかを決定します。CLI SAPIではオフにハードコードされています。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `html_errors = On`
#### docref_root および docref_ext
- **説明:** `html_errors` がオンであり、`docref_root` が空でない場合、PHPは詳細エラーメッセージへのリンク付きエラーメッセージを出力します。
- **設定例:** コメントアウトされていますが、使用する場合は次のように設定できます:
ini
docref_root = "/phpmanual/"
docref_ext = .html
#### error_prepend_string
- **説明:** エラーメッセージの前に出力する文字列を設定します。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `error_prepend_string = "<span style='color: #ff0000'>"`
#### error_append_string
- **説明:** エラーメッセージの後に出力する文字列を設定します。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `error_append_string = "</span>"`
#### error_log
- **説明:** エラーログを特定のファイルに記録します。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `error_log = php_errors.log`
#### syslog
- **説明:** エラーログを syslog に送信します(Windowsの場合はイベントログ)。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `error_log = syslog`
#### syslog.ident
- **説明:** syslog に記録される各メッセージに先行する文字列を設定します。`error_log` が `syslog` に設定されている場合にのみ使用されます。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `syslog.ident = php`
#### syslog.facility
- **説明:** メッセージを記録するプログラムの種類を指定します。`error_log` が `syslog` に設定されている場合にのみ使用されます。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `syslog.facility = user`
#### syslog.filter
- **説明:** 制御文字のフィルタリングを無効にするかどうかを設定します。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `syslog.filter = ascii`
これらの設定は、PHPのエラーハンドリングやログ管理、リソース制限に関連しており、開発と本番環境の両方で最適な設定を行うために重要です。
質問
;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;
; The separator used in PHP generated URLs to separate arguments.
; PHP's default setting is "&".
; https://php.net/arg-separator.output
; Example:
;arg_separator.output = "&"
; List of separator(s) used by PHP to parse input URLs into variables.
; PHP's default setting is "&".
; NOTE: Every character in this directive is considered as separator!
; https://php.net/arg-separator.input
; Example:
;arg_separator.input = ";&"
; This directive determines which super global arrays are registered when PHP
; starts up. G,P,C,E & S are abbreviations for the following respective super
; globals: GET, POST, COOKIE, ENV and SERVER. There is a performance penalty
; paid for the registration of these arrays and because ENV is not as commonly
; used as the others, ENV is not recommended on productions servers. You
; can still get access to the environment variables through getenv() should you
; need to.
; Default Value: "EGPCS"
; Development Value: "GPCS"
; Production Value: "GPCS";
; https://php.net/variables-order
variables_order = "GPCS"
; This directive determines which super global data (G,P & C) should be
; registered into the super global array REQUEST. If so, it also determines
; the order in which that data is registered. The values for this directive
; are specified in the same manner as the variables_order directive,
; EXCEPT one. Leaving this value empty will cause PHP to use the value set
; in the variables_order directive. It does not mean it will leave the super
; globals array REQUEST empty.
; Default Value: None
; Development Value: "GP"
; Production Value: "GP"
; https://php.net/request-order
request_order = "GP"
; This directive determines whether PHP registers $argv & $argc each time it
; runs. $argv contains an array of all the arguments passed to PHP when a script
; is invoked. $argc contains an integer representing the number of arguments
; that were passed when the script was invoked. These arrays are extremely
; useful when running scripts from the command line. When this directive is
; enabled, registering these variables consumes CPU cycles and memory each time
; a script is executed. For performance reasons, this feature should be disabled
; on production servers.
; Note: This directive is hardcoded to On for the CLI SAPI
; Default Value: On
; Development Value: Off
; Production Value: Off
; https://php.net/register-argc-argv
register_argc_argv = Off
; When enabled, the ENV, REQUEST and SERVER variables are created when they're
; first used (Just In Time) instead of when the script starts. If these
; variables are not used within a script, having this directive on will result
; in a performance gain. The PHP directive register_argc_argv must be disabled
; for this directive to have any effect.
; https://php.net/auto-globals-jit
auto_globals_jit = On
; Whether PHP will read the POST data.
; This option is enabled by default.
; Most likely, you won't want to disable this option globally. It causes $_POST
; and $_FILES to always be empty; the only way you will be able to read the
; POST data will be through the php://input stream wrapper. This can be useful
; to proxy requests or to process the POST data in a memory efficient fashion.
; https://php.net/enable-post-data-reading
;enable_post_data_reading = Off
; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; https://php.net/post-max-size
post_max_size = 8M
; Automatically add files before PHP document.
; https://php.net/auto-prepend-file
auto_prepend_file =
; Automatically add files after PHP document.
; https://php.net/auto-append-file
auto_append_file =
; By default, PHP will output a media type using the Content-Type header. To
; disable this, simply set it to be empty.
;
; PHP's built-in default media type is set to text/html.
; https://php.net/default-mimetype
default_mimetype = "text/html"
; PHP's default character set is set to UTF-8.
; https://php.net/default-charset
default_charset = "UTF-8"
; PHP internal character encoding is set to empty.
; If empty, default_charset is used.
; https://php.net/internal-encoding
;internal_encoding =
; PHP input character encoding is set to empty.
; If empty, default_charset is used.
; https://php.net/input-encoding
;input_encoding =
; PHP output character encoding is set to empty.
; If empty, default_charset is used.
; See also output_buffer.
; https://php.net/output-encoding
;output_encoding =
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
;include_path = ".:/usr/share/php"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
;
; PHP's default setting for include_path is ".;/path/to/php/pear"
; https://php.net/include-path
; The root of the PHP pages, used only if nonempty.
; 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)
; see documentation for security issues. The alternate is to use the
; cgi.force_redirect configuration below
; https://php.net/doc-root
doc_root =
; The directory under which PHP opens the script using /~username used only
; if nonempty.
; https://php.net/user-dir
user_dir =
; Directory in which the loadable extensions (modules) reside.
; https://php.net/extension-dir
;extension_dir = "./"
; On windows:
;extension_dir = "ext"
; Directory where the temporary files should be placed.
; Defaults to the system default (see sys_get_temp_dir)
;sys_temp_dir = "/tmp"
; Whether or not to enable the dl() function. The dl() function does NOT work
; properly in multithreaded servers, such as IIS or Zeus, and is automatically
; disabled on them.
; https://php.net/enable-dl
enable_dl = Off
; cgi.force_redirect is necessary to provide security running PHP as a CGI under
; most web servers. Left undefined, PHP turns this on by default. You can
; turn it off here AT YOUR OWN RISK
; **You CAN safely turn this off for IIS, in fact, you MUST.**
; https://php.net/cgi.force-redirect
;cgi.force_redirect = 1
; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
; every request. PHP's default behavior is to disable this feature.
;cgi.nph = 1
; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
; will look for to know it is OK to continue execution. Setting this variable MAY
; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
; https://php.net/cgi.redirect-status-env
;cgi.redirect_status_env =
; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's
; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting
; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting
; of zero causes PHP to behave as before. Default is 1. You should fix your scripts
; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
; https://php.net/cgi.fix-pathinfo
;cgi.fix_pathinfo=1
; if cgi.discard_path is enabled, the PHP CGI binary can safely be placed outside
; of the web tree and people will not be able to circumvent .htaccess security.
;cgi.discard_path=1
; FastCGI under IIS supports the ability to impersonate
; security tokens of the calling client. This allows IIS to define the
; security context that the request runs under. mod_fastcgi under Apache
; does not currently support this feature (03/17/2002)
; Set to 1 if running under IIS. Default is zero.
; https://php.net/fastcgi.impersonate
;fastcgi.impersonate = 1
; Disable logging through FastCGI connection. PHP's default behavior is to enable
; this feature.
;fastcgi.logging = 0
; cgi.rfc2616_headers configuration option tells PHP what type of headers to
; use when sending HTTP response code. If set to 0, PHP sends Status: header that
; is supported by Apache. When this option is set to 1, PHP will send
; RFC2616 compliant header.
; Default is zero.
; https://php.net/cgi.rfc2616-headers
;cgi.rfc2616_headers = 0
; cgi.check_shebang_line controls whether CGI PHP checks for line starting with #!
; (shebang) at the top of the running script. This line might be needed if the
; script support running both as stand-alone script and via PHP CGI<. PHP in CGI
; mode skips this line and ignores its content if this directive is turned on.
; https://php.net/cgi.check-shebang-line
;cgi.check_shebang_line=1
634~848行目の解説をお願いします。
回答
以下は、`php.ini` ファイルの行 634~848 の解説です。この部分は主にデータハンドリングとパスやディレクトリの設定に関するオプションを含んでいます。
### Data Handling セクション
#### arg_separator.output
- **説明:** PHPが生成するURLで引数を区切るセパレータを指定します。デフォルトは `&` です。
- **設定例:** デフォルト値:`arg_separator.output = "&"`
#### arg_separator.input
- **説明:** 入力URLを変数に分解するために使用するセパレータのリストを指定します。デフォルトは `&` です。
- **設定例:** デフォルト値:`arg_separator.input = "&"`
#### variables_order
- **説明:** PHPが起動時に登録するスーパーグローバル配列を指定します。 `G`, `P`, `C`, `E`, `S` はそれぞれ GET, POST, COOKIE, ENV, SERVER を表します。
- **設定例:** デフォルト値:`variables_order = "EGPCS"`
- **開発環境値:** `GPCS`
- **本番環境値:** `GPCS`
#### request_order
- **説明:** スーパーグローバル配列REQUESTに登録されるデータ(`G`, `P`, `C`)の順序を指定します。空にすると `variables_order` の値が使用されます。
- **設定例:** デフォルト値:`request_order = "GP"`
#### register_argc_argv
- **説明:** スクリプトの実行時に引数 `$argv` と `$argc` を登録するかどうかを決定します。本番環境ではパフォーマンス上の理由から無効にすることが推奨されます。
- **設定例:** `register_argc_argv = Off`
#### auto_globals_jit
- **説明:** スクリプトの起動時ではなく、最初に使用されたときにスーパーグローバル変数を作成するかどうかを決定します。 `register_argc_argv` が無効である必要があります。
- **設定例:** `auto_globals_jit = On`
#### enable_post_data_reading
- **説明:** PHPがPOSTデータを読み取るかどうかを設定します。これを無効にすると、`$_POST` および `$_FILES` が常に空となり、POSTデータは `php://input` ストリームラッパーを介してのみ取得できます。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `enable_post_data_reading = Off`
#### post_max_size
- **説明:** PHPが受け入れるPOSTデータの最大サイズを設定します。0を指定すると制限が無効になります。
- **設定例:** `post_max_size = 8M`
#### auto_prepend_file
- **説明:** PHPドキュメントの前に自動的に追加するファイルを指定します。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `auto_prepend_file = /path/to/file`
#### auto_append_file
- **説明:** PHPドキュメントの後に自動的に追加するファイルを指定します。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `auto_append_file = /path/to/file`
#### default_mimetype
- **説明:** PHPのデフォルトのMIMEタイプを設定します。
- **設定例:** `default_mimetype = "text/html"`
#### default_charset
- **説明:** PHPのデフォルトの文字セットを設定します。
- **設定例:** `default_charset = "UTF-8"`
#### internal_encoding
- **説明:** PHP内部文字エンコーディングを設定します。空の場合は `default_charset` が使用されます。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `internal_encoding = "UTF-8"`
#### input_encoding
- **説明:** PHP入力文字エンコーディングを設定します。空の場合は `default_charset` が使用されます。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `input_encoding = "UTF-8"`
#### output_encoding
- **説明:** PHP出力文字エンコーディングを設定します。空の場合は `default_charset` が使用されます。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `output_encoding = "UTF-8"`
### Paths and Directories セクション
#### include_path
- **説明:** PHPがファイルを含める際のデフォルトパスを指定します。
- **設定例:** UNIXでは `include_path = ".:/usr/share/php"`、Windowsでは `include_path = ".;c:\php\includes"`
#### doc_root
- **説明:** PHPページのルートディレクトリを設定します。非IISウェブサーバでPHPをCGIとして実行する場合に設定することが推奨されます。
- **設定例:** `doc_root =`
#### user_dir
- **説明:** `/~username` を使用してスクリプトを開く際のディレクトリを設定します。
- **設定例:** `user_dir =`
#### extension_dir
- **説明:** ロード可能な拡張機能(モジュール)が配置されるディレクトリを指定します。Windowsの例として `extension_dir = "ext"`
- **設定例:** `extension_dir = "./"`
#### sys_temp_dir
- **説明:** 一時ファイルを配置するディレクトリを設定します。デフォルトはシステムのデフォルト値です。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `sys_temp_dir = "/tmp"`
#### enable_dl
- **説明:** `dl()` 関数を有効にするかどうかを決定します。マルチスレッドサーバでは機能せず、自動的に無効になります。
- **設定例:** `enable_dl = Off`
### CGI and FastCGI セクション
#### cgi.force_redirect
- **説明:** PHPをCGIとして実行する際に必要な設定です。セキュリティのためにデフォルトでは有効になっていますが、IISで実行する場合は無効にする必要があります。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `cgi.force_redirect = 1`
#### cgi.nph
- **説明:** 有効にすると、すべてのリクエストで `Status: 200` を送信します。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `cgi.nph = 1`
#### cgi.redirect_status_env
- **説明:** ApacheやNetscape以外のウェブサーバで実行する場合に、続行するかどうかをPHPに通知する環境変数名を設定します。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `cgi.redirect_status_env =`
#### cgi.fix_pathinfo
- **説明:** CGIで `PATH_INFO/PATH_TRANSLATED` サポートを提供します。デフォルトでは1で、仕様に準拠するために設定されます。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `cgi.fix_pathinfo=1`
#### cgi.discard_path
- **説明:** 有効にすると、PHP CGIバイナリをウェブツリー外に安全に配置できます。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `cgi.discard_path=1`
#### fastcgi.impersonate
- **説明:** IISのFastCGIでは、リクエストのセキュリティコンテキストを設定できます。Apacheのmod_fastcgiではサポートされていません。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `fastcgi.impersonate = 1`
#### fastcgi.logging
- **説明:** FastCGI接続を介したロギングを無効にします。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `fastcgi.logging = 0`
#### cgi.rfc2616_headers
- **説明:** HTTPレスポンスコードを送信する際に使用するヘッダーの種類を設定します。0の場合は `Status:` ヘッダーを送信し、1の場合はRFC2616準拠のヘッダーを送信します。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `cgi.rfc2616_headers = 0`
#### cgi.check_shebang_line
- **説明:** スクリプトの先頭にあるシェバン行(#!)をチェックするかどうかを決定します。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `cgi.check_shebang_line=1`
これらの設定は、PHPのデータハンドリング、パスとディレクトリの管理、およびCGIおよびFastCGIの動作を細かく制御するためのオプションを提供します。適切な設定を行うことで、セキュリティやパフォーマンスを最適化できます。
質問
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
; Whether to allow HTTP file uploads.
; https://php.net/file-uploads
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
; https://php.net/upload-tmp-dir
;upload_tmp_dir =
; Maximum allowed size for uploaded files.
; https://php.net/upload-max-filesize
upload_max_filesize = 2M
; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20
;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
; https://php.net/allow-url-fopen
allow_url_fopen = On
; Whether to allow include/require to open URLs (like https:// or ftp://) as files.
; https://php.net/allow-url-include
allow_url_include = Off
; Define the anonymous ftp password (your email address). PHP's default setting
; for this is empty.
; https://php.net/from
;from="john@doe.com"
; Define the User-Agent string. PHP's default setting for this is empty.
; https://php.net/user-agent
;user_agent="PHP"
; Default timeout for socket based streams (seconds)
; https://php.net/default-socket-timeout
default_socket_timeout = 60
; If your scripts have to deal with files from Macintosh systems,
; or you are running on a Mac and need to deal with files from
; unix or win32 systems, setting this flag will cause PHP to
; automatically detect the EOL character in those files so that
; fgets() and file() will work regardless of the source of the file.
; https://php.net/auto-detect-line-endings
;auto_detect_line_endings = Off
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=modulename
;
; For example:
;
; extension=mysqli
;
; When the extension library to load is not located in the default extension
; directory, You may specify an absolute path to the library file:
;
; extension=/path/to/extension/mysqli.so
;
; Note : The syntax used in previous PHP versions ('extension=<ext>.so' and
; 'extension='php_<ext>.dll') is supported for legacy reasons and may be
; deprecated in a future PHP major version. So, when it is possible, please
; move to the new ('extension=<ext>) syntax.
;
; Notes for Windows environments :
;
; - Many DLL files are located in the ext/
; extension folders as well as the separate PECL DLL download.
; Be sure to appropriately set the extension_dir directive.
;
;extension=bz2
; The ldap extension must be before curl if OpenSSL 1.0.2 and OpenLDAP is used
; otherwise it results in segfault when unloading after using SASL.
; See https://github.com/php/php-src/issues/8620 for more info.
;extension=ldap
;extension=curl
;extension=ffi
;extension=ftp
;extension=fileinfo
;extension=gd
;extension=gettext
;extension=gmp
;extension=intl
;extension=imap
;extension=mbstring
;extension=exif ; Must be after mbstring as it depends on it
;extension=mysqli
;extension=oci8_12c ; Use with Oracle Database 12c Instant Client
;extension=oci8_19 ; Use with Oracle Database 19 Instant Client
;extension=odbc
;extension=openssl
;extension=pdo_firebird
;extension=pdo_mysql
;extension=pdo_oci
;extension=pdo_odbc
;extension=pdo_pgsql
;extension=pdo_sqlite
;extension=pgsql
;extension=shmop
; The MIBS data available in the PHP distribution must be installed.
; See https://www.php.net/manual/en/snmp.installation.php
;extension=snmp
;extension=soap
;extension=sockets
;extension=sodium
;extension=sqlite3
;extension=tidy
;extension=xsl
;extension=zip
;zend_extension=opcache
850~976行目の解説をお願いします。
回答
以下は、`php.ini` ファイルの行 850~976 の解説です。この部分はファイルアップロードの設定、ファイルハンドリング(Fopen wrappers)の設定、および動的拡張(Dynamic Extensions)の設定に関するオプションを含んでいます。
### File Uploads セクション
#### file_uploads
- **説明:** HTTPファイルアップロードを許可するかどうかを決定します。
- **設定例:** `file_uploads = On`
#### upload_tmp_dir
- **説明:** HTTPアップロードされたファイルの一時ディレクトリを指定します。指定しない場合、システムのデフォルトディレクトリが使用されます。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `upload_tmp_dir = /path/to/temp/dir`
#### upload_max_filesize
- **説明:** アップロード可能なファイルの最大サイズを設定します。
- **設定例:** `upload_max_filesize = 2M`
#### max_file_uploads
- **説明:** 単一のリクエストでアップロード可能なファイルの最大数を設定します。
- **設定例:** `max_file_uploads = 20`
### Fopen Wrappers セクション
#### allow_url_fopen
- **説明:** URL(例:http:// や ftp://)をファイルとして取り扱うことを許可するかどうかを決定します。
- **設定例:** `allow_url_fopen = On`
#### allow_url_include
- **説明:** URLを `include` および `require` 文で開くことを許可するかどうかを決定します。
- **設定例:** `allow_url_include = Off`
#### from
- **説明:** 匿名FTPのパスワード(メールアドレス)を設定します。デフォルトは空です。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `from = "john@doe.com"`
#### user_agent
- **説明:** ユーザーエージェント文字列を設定します。デフォルトは空です。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `user_agent = "PHP"`
#### default_socket_timeout
- **説明:** ソケットベースのストリームのデフォルトタイムアウトを秒単位で設定します。
- **設定例:** `default_socket_timeout = 60`
#### auto_detect_line_endings
- **説明:** ファイルの改行文字を自動的に検出するかどうかを決定します。Macintoshシステムからのファイルを扱う場合に便利です。
- **設定例:** デフォルトではコメントアウトされていますが、使用する場合は `auto_detect_line_endings = Off`
### Dynamic Extensions セクション
このセクションでは、動的にロードされる拡張機能(モジュール)の設定を行います。
#### extension
- **説明:** ロードする拡張機能を自動的に指定します。
- **設定例:**
- `extension = modulename` という形式で指定します。
- 例:`extension = mysqli`
- 拡張機能のライブラリがデフォルトの拡張ディレクトリにない場合、絶対パスを指定することもできます。
- 例:`extension = /path/to/extension/mysqli.so`
#### Notes for Windows environments
- **説明:** Windows環境での特記事項や設定方法について説明しています。
- 多くのDLLファイルは `ext/` フォルダなどにあるため、適切に `extension_dir` ディレクティブを設定する必要があります。
- 例:`extension_dir = "ext"`
#### 各種拡張機能の例:
- **説明:** 一部の拡張機能の例が示されています。コメントを外すことで有効化できます。以下はいくつかの例です:
- `extension=bz2`
- `extension=ldap`
- `extension=curl`
- `extension=ftp`
- `extension=gd`
- `extension=mbstring`
- `extension=mysqli`
- `extension=openssl`
- `extension=pdo_mysql`
- `extension=pgsql`
- `extension=zip`
#### zend_extension
- **説明:** Zend拡張機能(例: `opcache`)の場合は `zend_extension` ディレクティブを使用します。
- **設定例:** `zend_extension = opcache`
このセクションで設定されているオプションは、PHPが提供する機能を拡張し、ファイルアップロード、URLリンク、ソケット通信、および特定の拡張機能の動作を制御するためのものです。適切な設定を行うことで、アプリケーションの動作を最適化し、必要な機能を有効にすることができます。