メインコンテンツへスキップ
見出し画像

Ubuntu24でトラブルを起こしているPHPの実態について迫ってみた!!

    上のリンク先の続きです。

    質問

    [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, toggle zend.assertions between the values 1 and 0)
    ; Default Value: 1
    ; Development Value: 1
    ; Production Value: -1
    ; https://php.net/zend.assertions
    zend.assertions = -1

    [COM]
    ; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs
    ; https://php.net/com.typelib-file
    ;com.typelib_file =

    ; allow Distributed-COM calls
    ; https://php.net/com.allow-dcom
    ;com.allow_dcom = true

    ; autoregister constants of a component's typelib on com_load()
    ; https://php.net/com.autoregister-typelib
    ;com.autoregister_typelib = true

    ; register constants casesensitive
    ; https://php.net/com.autoregister-casesensitive
    ;com.autoregister_casesensitive = false

    ; show warnings on duplicate constant registrations
    ; https://php.net/com.autoregister-verbose
    ;com.autoregister_verbose = true

    ; The default character set code-page to use when passing strings to and from COM objects.
    ; Default: system ANSI code page
    ;com.code_page=

    ; The version of the .NET framework to use. The value of the setting are the first three parts
    ; of the framework's version number, separated by dots, and prefixed with "v", e.g. "v4.0.30319".
    ;com.dotnet_version=

    [mbstring]
    ; language for internal character representation.
    ; This affects mb_send_mail() and mbstring.detect_order.
    ; https://php.net/mbstring.language
    ;mbstring.language = Japanese

    ; Use of this INI entry is deprecated, use global internal_encoding instead.
    ; internal/script encoding.
    ; Some encoding cannot work as internal encoding. (e.g. SJIS, BIG5, ISO-2022-*)
    ; If empty, default_charset or internal_encoding or iconv.internal_encoding is used.
    ; The precedence is: default_charset < internal_encoding < iconv.internal_encoding
    ;mbstring.internal_encoding =

    ; Use of this INI entry is deprecated, use global input_encoding instead.
    ; http input encoding.
    ; mbstring.encoding_translation = On is needed to use this setting.
    ; If empty, default_charset or input_encoding or mbstring.input is used.
    ; The precedence is: default_charset < input_encoding < mbstring.http_input
    ; https://php.net/mbstring.http-input
    ;mbstring.http_input =

    ; Use of this INI entry is deprecated, use global output_encoding instead.
    ; http output encoding.
    ; mb_output_handler must be registered as output buffer to function.
    ; If empty, default_charset or output_encoding or mbstring.http_output is used.
    ; The precedence is: default_charset < output_encoding < mbstring.http_output
    ; To use an output encoding conversion, mbstring's output handler must be set
    ; otherwise output encoding conversion cannot be performed.
    ; https://php.net/mbstring.http-output
    ;mbstring.http_output =

    ; enable automatic encoding translation according to
    ; mbstring.internal_encoding setting. Input chars are
    ; converted to internal encoding by setting this to On.
    ; Note: Do _not_ use automatic encoding translation for
    ; portable libs/applications.
    ; https://php.net/mbstring.encoding-translation
    ;mbstring.encoding_translation = Off

    ; automatic encoding detection order.
    ; "auto" detect order is changed according to mbstring.language
    ; https://php.net/mbstring.detect-order
    ;mbstring.detect_order = auto

    ; substitute_character used when character cannot be converted
    ; one from another
    ; https://php.net/mbstring.substitute-character
    ;mbstring.substitute_character = none

    ; Enable strict encoding detection.
    ;mbstring.strict_detection = Off

    ; This directive specifies the regex pattern of content types for which mb_output_handler()
    ; is activated.
    ; Default: mbstring.http_output_conv_mimetypes=^(text/|application/xhtml\+xml)
    ;mbstring.http_output_conv_mimetypes=

    ; This directive specifies maximum stack depth for mbstring regular expressions. It is similar
    ; to the pcre.recursion_limit for PCRE.
    ;mbstring.regex_stack_limit=100000

    ; This directive specifies maximum retry count for mbstring regular expressions. It is similar
    ; to the pcre.backtrack_limit for PCRE.
    ;mbstring.regex_retry_limit=1000000

    [gd]
    ; Tell the jpeg decode to ignore warnings and try to create
    ; a gd image. The warning will then be displayed as notices
    ; disabled by default
    ; https://php.net/gd.jpeg-ignore-warning
    ;gd.jpeg_ignore_warning = 1

    [exif]
    ; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS.
    ; With mbstring support this will automatically be converted into the encoding
    ; given by corresponding encode setting. When empty mbstring.internal_encoding
    ; is used. For the decode settings you can distinguish between motorola and
    ; intel byte order. A decode setting cannot be empty.
    ; https://php.net/exif.encode-unicode
    ;exif.encode_unicode = ISO-8859-15

    ; https://php.net/exif.decode-unicode-motorola
    ;exif.decode_unicode_motorola = UCS-2BE

    ; https://php.net/exif.decode-unicode-intel
    ;exif.decode_unicode_intel = UCS-2LE

    ; https://php.net/exif.encode-jis
    ;exif.encode_jis =

    ; https://php.net/exif.decode-jis-motorola
    ;exif.decode_jis_motorola = JIS

    ; https://php.net/exif.decode-jis-intel
    ;exif.decode_jis_intel = JIS

    [Tidy]
    ; The path to a default tidy configuration file to use when using tidy
    ; https://php.net/tidy.default-config
    ;tidy.default_config = /usr/local/lib/php/default.tcfg

    ; Should tidy clean and repair output automatically?
    ; WARNING: Do not use this option if you are generating non-html content
    ; such as dynamic images
    ; https://php.net/tidy.clean-output
    tidy.clean_output = Off

    [soap]
    ; Enables or disables WSDL caching feature.
    ; https://php.net/soap.wsdl-cache-enabled
    soap.wsdl_cache_enabled=1

    ; Sets the directory name where SOAP extension will put cache files.
    ; https://php.net/soap.wsdl-cache-dir
    soap.wsdl_cache_dir="/tmp"

    ; (time to live) Sets the number of second while cached file will be used
    ; instead of original one.
    ; https://php.net/soap.wsdl-cache-ttl
    soap.wsdl_cache_ttl=86400

    ; Sets the size of the cache limit. (Max. number of WSDL files to cache)
    soap.wsdl_cache_limit = 5

    [sysvshm]
    ; A default size of the shared memory segment
    ;sysvshm.init_mem = 10000

    [ldap]
    ; Sets the maximum number of open links or -1 for unlimited.
    ldap.max_links = -1

    [dba]
    ;dba.default_handler=

    1603~1778行目の解説をお願いします

    回答

    以下は、`php.ini` ファイルの行 1603~1778 の解説です。この部分には、アサーション、COM、mbstring、gd、exif、Tidy、SOAP、sysvshm、LDAP、およびDBA関連の設定オプションが含まれています。

    ### Assertion セクション

    #### zend.assertions
    - **説明:** アサーションをコンパイルするかどうかを設定します。ランタイムでのオーバーヘッドを避けるために使用します。
    - **設定例:** `zend.assertions = -1`
    - `-1`: アサーションを全くコンパイルしない
    - `0`: ランタイムでアサーションをジャンプ
    - `1`: アサーションを実行

    ### COM セクション

    #### com.typelib_file
    - **説明:** GUIDs、IIDsまたはファイル名を含むファイルのパスを設定します。
    - **設定例:** コメントアウトされています。

    #### com.allow_dcom
    - **説明:** 分散COM呼び出しを許可するかどうかを設定します。
    - **設定例:** コメントアウトされていますが、使用する場合は `com.allow_dcom = true`

    #### com.autoregister_typelib
    - **説明:** `com_load()` 時にコンポーネントのタイプライブラリの定数を自動登録するかどうかを設定します。
    - **設定例:** コメントアウトされていますが、使用する場合は `com.autoregister_typelib = true`

    #### com.autoregister_casesensitive
    - **説明:** 登録された定数のケースセンシティビティを設定します。
    - **設定例:** コメントアウトされていますが、使用する場合は `com.autoregister_casesensitive = false`

    #### com.autoregister_verbose
    - **説明:** 重複する定数の登録時に警告を表示するかどうかを設定します。
    - **設定例:** コメントアウトされていますが、使用する場合は `com.autoregister_verbose = true`

    #### com.code_page
    - **説明:** COMオブジェクトとの文字列の入出力時に使用するデフォルトの文字セットコードページを設定します。
    - **設定例:** コメントアウトされています。

    #### com.dotnet_version
    - **説明:** 使用する.NETフレームワークのバージョンを設定します。例:`"v4.0.30319"`
    - **設定例:** コメントアウトされています。

    ### Mbstring セクション

    #### mbstring.language
    - **説明:** 内部文字表現に使用する言語を設定します。これは `mb_send_mail()` や `mbstring.detect_order` に影響します。
    - **設定例:** コメントアウトされていますが、使用する場合は `mbstring.language = Japanese`

    #### mbstring.internal_encoding
    - **説明:** 内部エンコーディングを設定します。非推奨であるため、代わりに `internal_encoding` を使用します。
    - **設定例:** コメントアウトされています。

    #### mbstring.http_input
    - **説明:** HTTP入力エンコーディングを設定します。非推奨であるため、代わりに `input_encoding` を使用します。
    - **設定例:** コメントアウトされています。

    #### mbstring.http_output
    - **説明:** HTTP出力エンコーディングを設定します。非推奨であるため、代わりに `output_encoding` を使用します。
    - **設定例:** コメントアウトされています。

    #### mbstring.encoding_translation
    - **説明:** `mbstring.internal_encoding` 設定に従って自動エンコーディング変換を有効にします。
    - **設定例:** コメントアウトされていますが、使用する場合は `mbstring.encoding_translation = Off`

    #### mbstring.detect_order
    - **説明:** 自動エンコーディング検出の順序を設定します。
    - **設定例:** コメントアウトされていますが、使用する場合は `mbstring.detect_order = auto`

    #### mbstring.substitute_character
    - **説明:** 文字の変換に失敗した際に使用される代替キャラクタを設定します。
    - **設定例:** コメントアウトされていますが、使用する場合は `mbstring.substitute_character = none`

    #### mbstring.strict_detection
    - **説明:** 厳密なエンコーディング検出を有効にします。
    - **設定例:** コメントアウトされていますが、使用する場合は `mbstring.strict_detection = Off`

    #### mbstring.http_output_conv_mimetypes
    - **説明:** `mb_output_handler()` がアクティブになるコンテンツタイプの正規表現パターンを設定します。
    - **設定例:** コメントアウトされています。

    #### mbstring.regex_stack_limit
    - **説明:** mbstring 正規表現の最大スタック深度を指定します。
    - **設定例:** コメントアウトされていますが、使用する場合は `mbstring.regex_stack_limit = 100000`

    #### mbstring.regex_retry_limit
    - **説明:** mbstring 正規表現の最大リトライ回数を指定します。
    - **設定例:** コメントアウトされていますが、使用する場合は `mbstring.regex_retry_limit = 1000000`

    ### GD セクション

    #### gd.jpeg_ignore_warning
    - **説明:** JPEGのデコード時に警告を無視して GD 画像を作成するかどうかを設定します。
    - **設定例:** コメントアウトされていますが、使用する場合は `gd.jpeg_ignore_warning = 1`

    ### Exif セクション

    #### exif.encode_unicode
    - **説明:** ExifのUNICODEユーザコメントをエンコードする形式を設定します。
    - **設定例:** コメントアウトされていますが、使用する場合は `exif.encode_unicode = ISO-8859-15`

    #### exif.decode_unicode_motorola
    - **説明:** Motorolaバイト順でエンコードされたExifのUNICODEをデコードする形式を設定します。
    - **設定例:** コメントアウトされていますが、使用する場合は `exif.decode_unicode_motorola = UCS-2BE`

    #### exif.decode_unicode_intel
    - **説明:** Intelバイト順でエンコードされたExifのUNICODEをデコードする形式を設定します。
    - **設定例:** コメントアウトされていますが、使用する場合は `exif.decode_unicode_intel = UCS-2LE`

    #### exif.encode_jis
    - **説明:** ExifのJISユーザコメントをエンコードする形式を設定します。
    - **設定例:** コメントアウトされていますが、使用する場合は `exif.encode_jis = JIS`

    #### exif.decode_jis_motorola
    - **説明:** Motorolaバイト順でエンコードされたExifのJISをデコードする形式を設定します。
    - **設定例:** コメントアウトされていますが、使用する場合は `exif.decode_jis_motorola = JIS`

    #### exif.decode_jis_intel
    - **説明:** Intelバイト順でエンコードされたExifのJISをデコードする形式を設定します。
    - **設定例:** コメントアウトされていますが、使用する場合は `exif.decode_jis_intel = JIS`

    ### Tidy セクション

    #### tidy.default_config
    - **説明:** 使用するデフォルトのTidy設定ファイルのパスを設定します。
    - **設定例:** コメントアウトされています。

    #### tidy.clean_output
    - **説明:** Tidy が出力を自動的にクリーンアップおよび修正するかどうかを設定します。非HTMLコンテンツを生成する場合は使用しないでください。
    - **設定例:** `tidy.clean_output = Off`

    ### SOAP セクション

    #### soap.wsdl_cache_enabled
    - **説明:** WSDLキャッシュ機能を有効にするか無効にするかを設定します。
    - **設定例:** `soap.wsdl_cache_enabled = 1`

    #### soap.wsdl_cache_dir
    - **説明:** SOAP拡張機能がキャッシュファイルを保存するディレクトリ名を設定します。
    - **設定例:** `soap.wsdl_cache_dir = "/tmp"`

    #### soap.wsdl_cache_ttl
    - **説明:** キャッシュファイルの有効期限を秒単位で設定します。
    - **設定例:** `soap.wsdl_cache_ttl = 86400`(24時間)

    #### soap.wsdl_cache_limit
    - **説明:** キャッシュできるWSDLファイルの最大数を設定します。
    - **設定例:** `soap.wsdl_cache_limit = 5`

    ### Sysvshm セクション

    #### sysvshm.init_mem
    - **説明:** 共有メモリセグメントのデフォルトサイズを設定します。
    - **設定例:** コメントアウトされていますが、使用する場合は `sysvshm.init_mem = 10000`

    ### LDAP セクション

    #### ldap.max_links
    - **説明:** 開くことができる最大リンク数を設定します。 `-1` は無制限を意味します。
    - **設定例:** `ldap.max_links = -1`

    ### DBA セクション

    #### dba.default_handler
    - **説明:** デフォルトのDBAハンドラを設定します。
    - **設定例:** コメントアウトされています。

    これらの設定は、PHPが提供する特定の機能やモジュール(アサーション、COM、mbstring、gd、exif、Tidy、SOAP、sysvshm、LDAP、DBAなど)の動作を詳細に制御するものです。状況に応じて各設定を適切に行うことで、PHPの動作をカスタマイズし、パフォーマンスやセキュリティを最適化することができます。

    質問

    [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=0

    ; 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 1000000 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, compilation warnings (including notices and deprecations) will
    ; be recorded and replayed each time a file is included. Otherwise, compilation
    ; warnings will only be emitted when the file is first cached.
    ;opcache.record_warnings=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=0x7FFFBFFF

    ;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

    ; 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=

    ; Facilitates multiple OPcache instances per user (for Windows only). All PHP
    ; processes with the same cache ID and user share an OPcache instance.
    ;opcache.cache_id=

    ; 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.
    ; Under certain circumstances (if only a single global PHP process is
    ; started from which all others fork), this can increase performance
    ; by a tiny amount because TLB misses are reduced. On the other hand, this
    ; delays PHP startup, increases memory usage and degrades performance
    ; under memory pressure - use with care.
    ; 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

    ; If specified, it produces opcode dumps for debugging different stages of
    ; optimizations.
    ;opcache.opt_debug_level=0

    ; Specifies a PHP script that is going to be compiled and executed at server
    ; start-up.
    ; https://php.net/opcache.preload
    ;opcache.preload=

    ; Preloading code as root is not allowed for security reasons. This directive
    ; facilitates to let the preloading to be run as another user.
    ; https://php.net/opcache.preload_user
    ;opcache.preload_user=

    ; Prevents caching files that are less than this number of seconds old. It
    ; protects from caching of incompletely updated files. In case all file updates
    ; on your site are atomic, you may increase performance by setting it to "0".
    ;opcache.file_update_protection=2

    ; Absolute path used to store shared lockfiles (for *nix only).
    ;opcache.lockfile_path=/tmp

    [curl]
    ; A default value for the CURLOPT_CAINFO option. This is required to be an
    ; absolute path.
    ;curl.cainfo =

    [openssl]
    ; The location of a Certificate Authority (CA) file on the local filesystem
    ; to use when verifying the identity of SSL/TLS peers. Most users should
    ; not specify a value for this directive as PHP will attempt to use the
    ; OS-managed cert stores in its absence. If specified, this value may still
    ; be overridden on a per-stream basis via the "cafile" SSL stream context
    ; option.
    ;openssl.cafile=

    ; If openssl.cafile is not specified or if the CA file is not found, the
    ; directory pointed to by openssl.capath is searched for a suitable
    ; certificate. This value must be a correctly hashed certificate directory.
    ; Most users should not specify a value for this directive as PHP will
    ; attempt to use the OS-managed cert stores in its absence. If specified,
    ; this value may still be overridden on a per-stream basis via the "capath"
    ; SSL stream context option.
    ;openssl.capath=

    [ffi]
    ; FFI API restriction. Possible values:
    ; "preload" - enabled in CLI scripts and preloaded files (default)
    ; "false" - always disabled
    ; "true" - always enabled
    ;ffi.enable=preload

    ; List of headers files to preload, wildcard patterns allowed.
    ;ffi.preload=

    1780~1966行目の解説をお願いします

    回答

    以下は、`php.ini` ファイルの行 1780~1966 の解説です。この部分には、Zend OPcache、curl、openssl、FFI(Foreign Function Interface)関連の設定オプションが含まれています。

    ### OPcache セクション

    #### opcache.enable
    - **説明:** Zend OPcacheを有効にするかどうかを設定します。
    - **設定例:** コメントアウトされていますが、使用する場合は `opcache.enable=1`

    #### opcache.enable_cli
    - **説明:** CLI版のPHPに対してZend OPcacheを有効にするかどうかを設定します。
    - **設定例:** コメントアウトされていますが、使用する場合は `opcache.enable_cli=0`

    #### opcache.memory_consumption
    - **説明:** OPcache共有メモリのストレージサイズを設定します。
    - **設定例:** `opcache.memory_consumption=128`

    #### opcache.interned_strings_buffer
    - **説明:** インターンの文字列のためのメモリバッファサイズをMB単位で設定します。
    - **設定例:** `opcache.interned_strings_buffer=8`

    #### opcache.max_accelerated_files
    - **説明:** OPcacheハッシュテーブルに格納されるキー(スクリプト)の最大数を設定します。200〜1000000の範囲で設定可能です。
    - **設定例:** `opcache.max_accelerated_files=10000`

    #### opcache.max_wasted_percentage
    - **説明:** 再起動がスケジュールされるまでの"無駄"メモリの最大パーセンテージを設定します。
    - **設定例:** `opcache.max_wasted_percentage=5`

    #### opcache.use_cwd
    - **説明:** 現在の作業ディレクトリをスクリプトキーに追加するかどうかを設定します。同名ファイル間の衝突を回避しますが、パフォーマンスに影響します。
    - **設定例:** `opcache.use_cwd=1`

    #### opcache.validate_timestamps
    - **説明:** オフにすると、ファイルシステムの変更を反映するために手動でOPcacheをリセットするか、Webサーバを再起動する必要があります。
    - **設定例:** `opcache.validate_timestamps=1`

    #### opcache.revalidate_freq
    - **説明:** 共有メモリストレージの変更をチェックするためのファイルタイムスタンプをチェックする頻度(秒単位)を設定します。`0`は常に検証します。
    - **設定例:** `opcache.revalidate_freq=2`

    #### opcache.revalidate_path
    - **説明:** インクルード路径の最適化を有効にするかどうかを設定します。
    - **設定例:** `opcache.revalidate_path=0`

    #### opcache.save_comments
    - **説明:** 無効にすると、コードからすべてのPHPDocコメントが削除され、コードのサイズが減少します。
    - **設定例:** `opcache.save_comments=1`

    #### opcache.record_warnings
    - **説明:** コンパイル警告(通知と非推奨警告を含む)を記録し、ファイルが含まれるたびに再生するかどうかを設定します。
    - **設定例:** `opcache.record_warnings=0`

    #### opcache.enable_file_override
    - **説明:** `file_exists` などのパフォーマンス機能を許可するかどうかを設定します。
    - **設定例:** `opcache.enable_file_override=0`

    #### opcache.optimization_level
    - **説明:** ビットマスクであり、各ビットが適切なOPcacheパスの有効化または無効化を制御します。
    - **設定例:** `opcache.optimization_level=0x7FFFBFFF`

    #### opcache.dups_fix
    - **説明:** 重複の修正を有効にするかどうかを設定します。
    - **設定例:** コメントアウトされています。

    #### opcache.blacklist_filename
    - **説明:** OPcacheのブラックリストファイルの位置を設定します。ワイルドカードが許可されています。
    - **設定例:** コメントアウトされていますが、使用する場合は `opcache.blacklist_filename=/path/to/blacklist.txt`

    #### opcache.max_file_size
    - **説明:** キャッシュから除外される大きなファイルのサイズを設定します。デフォルトですべてのファイルがキャッシュされます。
    - **設定例:** `opcache.max_file_size=0`

    #### opcache.force_restart_timeout
    - **説明:** キャッシュがアクセスされていない場合にスケジュールされた再起動が開始されるまでの待機時間を秒単位で設定します。
    - **設定例:** `opcache.force_restart_timeout=180`

    #### opcache.error_log
    - **説明:** OPcacheのエラーログファイル名を設定します。空の文字列は "stderr" を意味します。
    - **設定例:** コメントアウトされていますが、使用する場合は `opcache.error_log=/path/to/error.log`

    #### opcache.log_verbosity_level
    - **説明:** OPcacheエラーの詳細レベルを設定します。デフォルトは1(エラーのみ)です。
    - **設定例:** `opcache.log_verbosity_level=1`

    #### opcache.preferred_memory_model
    - **説明:** 推奨共有メモリバックエンドを設定します。空白にしてシステムに決定させます。
    - **設定例:** コメントアウトされています。

    #### opcache.protect_memory
    - **説明:** スクリプト実行中の共有メモリの予期しない書き込みから保護します。内部デバッグのみのために使用します。
    - **設定例:** `opcache.protect_memory=0`

    #### opcache.restrict_api
    - **説明:** 特定のディレクトリ経由でのみOPcache API関数を呼び出すことを許可します。デフォルトは""で制限なしです。
    - **設定例:** コメントアウトされています。

    #### opcache.file_cache
    - **説明:** 2次キャッシュディレクトリを有効にします。ファイルベースのキャッシュを使用する場合はパフォーマンスが向上します。
    - **設定例:** コメントアウトされていますが、使用する場合は `opcache.file_cache=/path/to/cache`

    #### opcache.file_cache_only
    - **説明:** 共有メモリ内でのopcodeキャッシュを無効にして、ファイルキャッシュのみを使用するかどうかを設定します。
    - **設定例:** `opcache.file_cache_only=0`

    #### opcache.file_cache_consistency_checks
    - **説明:** ファイルキャッシュから読み込まれたスクリプトのチェックサム検証を有効にするかどうかを設定します。
    - **設定例:** `opcache.file_cache_consistency_checks=1`

    #### opcache.file_cache_fallback
    - **説明:** ファイルキャッシュが明示的に有効になっている場合、共有メモリに再アタッチできなかった場合にファイルキャッシュのみを使用するかどうかを設定します。
    - **設定例:** `opcache.file_cache_fallback=1`

    #### opcache.huge_code_pages
    - **説明:** PHPコード(テキストセグメント)をHUGE PAGESにコピーするかどうかを設定します。特定の条件下でパフォーマンスが向上しますが、初期化が遅延し、メモリ使用量が増加します。
    - **設定例:** `opcache.huge_code_pages=0`

    #### opcache.validate_permission
    - **説明:** キャッシュされたファイルの権限を検証するかどうかを設定します。
    - **設定例:** `opcache.validate_permission=0`

    #### opcache.validate_root
    - **説明:** chroot環境での名前の衝突を防ぐために検証します。
    - **設定例:** `opcache.validate_root=0`

    #### opcache.opt_debug_level
    - **説明:** 最適化の異なる段階のデバッグのためのオプコードダンプを生成します。
    - **設定例:** `opcache.opt_debug_level=0`

    #### opcache.preload
    - **説明:** サーバー起動時にコンパイルおよび実行されるPHPスクリプトを指定します。
    - **設定例:** コメントアウトされていますが、使用する場合は `opcache.preload=/path/to/preload.php`

    #### opcache.preload_user
    - **説明:** セキュリティ上の理由からrootとしてのコードのプリロードを許可しないように、特定のユーザーとしてプリロードを実行するように指定します。
    - **設定例:** コメントアウトされています。

    #### opcache.file_update_protection
    - **説明:** 更新されたファイルが不完全な状態でキャッシュされないようにするための設定です。サイトのすべてのファイル更新がアトミックである場合、この設定を0にすることでパフォーマンスが向上します。
    - **設定例:** `opcache.file_update_protection=2`

    #### opcache.lockfile_path
    - **説明:** 共有ロックファイルを格納するための絶対パスを設定します(*nixのみ)。
    - **設定例:** `opcache.lockfile_path=/tmp`

    ### curl セクション

    #### curl.cainfo
    - **説明:** `CURLOPT_CAINFO` オプションのデフォルト値を設定します。これは絶対パスである必要があります。
    - **設定例:** コメントアウトされていますが、使用する場合は `curl.cainfo=/path/to/cacert.pem`

    ### openssl セクション

    #### openssl.cafile
    - **説明:** SSL/TLSピアのIDを検証する際に使用するCAファイルの位置を設定します。ほとんどのユーザーは設定しなくてもOS管理の証明書ストアが使用されます。
    - **設定例:** コメントアウトされていますが、使用する場合は `openssl.cafile=/path/to/ca-bundle.crt`

    #### openssl.capath
    - **説明:** CAファイルが見つからない場合に検索するディレクトリを設定します。ほとんどのユーザーは設定しなくてもOS管理の証明書ストアが使用されます。
    - **設定例:** コメントアウトされていますが、使用する場合は `openssl.capath=/path/to/certs`

    ### FFI(Foreign Function Interface)セクション

    #### ffi.enable
    - **説明:** FFI API を有効にするかどうかを設定します。
    - **設定例:** `ffi.enable=preload`

    #### ffi.preload
    - **説明:** プリロードするヘッダーファイルのリストを指定します。ワイルドカードパターンが許可されています。
    - **設定例:** コメントアウトされていますが、使用する場合は `ffi.preload="/path/to/header.h"`

    これらの設定は、PHPのキャッシュ、SSL/TLS検証、およびFFIに関連した機能の動作を詳細に制御するためのものです。それぞれの設定を適切に調整することで、パフォーマンスやセキュリティを最適化できます。


    あなたへのおすすめ