VPS侦探论坛

 找回密码
 注册
查看: 4052|回复: 3

lnmp1.4开启OPcache php.ini无变化

[复制链接]
发表于 2017-4-9 11:37:02 | 显示全部楼层 |阅读模式

php7.1.3 CentOS 7+最新版

lnmp1.4开启OPcache./addons.sh install opcache显示安装成功
php.ini无变化,显示#




  1. [opcache]
  2. ; Determines if Zend OPCache is enabled
  3. ;opcache.enable=1

  4. ; Determines if Zend OPCache is enabled for the CLI version of PHP
  5. ;opcache.enable_cli=1

  6. ; The OPcache shared memory storage size.
  7. ;opcache.memory_consumption=128

  8. ; The amount of memory for interned strings in Mbytes.
  9. ;opcache.interned_strings_buffer=8

  10. ; The maximum number of keys (scripts) in the OPcache hash table.
  11. ; Only numbers between 200 and 100000 are allowed.
  12. ;opcache.max_accelerated_files=10000

  13. ; The maximum percentage of "wasted" memory until a restart is scheduled.
  14. ;opcache.max_wasted_percentage=5

  15. ; When this directive is enabled, the OPcache appends the current working
  16. ; directory to the script key, thus eliminating possible collisions between
  17. ; files with the same name (basename). Disabling the directive improves
  18. ; performance, but may break existing applications.
  19. ;opcache.use_cwd=1

  20. ; When disabled, you must reset the OPcache manually or restart the
  21. ; webserver for changes to the filesystem to take effect.
  22. ;opcache.validate_timestamps=1

  23. ; How often (in seconds) to check file timestamps for changes to the shared
  24. ; memory storage allocation. ("1" means validate once per second, but only
  25. ; once per request. "0" means always validate)
  26. ;opcache.revalidate_freq=2

  27. ; Enables or disables file search in include_path optimization
  28. ;opcache.revalidate_path=0

  29. ; If disabled, all PHPDoc comments are dropped from the code to reduce the
  30. ; size of the optimized code.
  31. ;opcache.save_comments=1

  32. ; If enabled, a fast shutdown sequence is used for the accelerated code
  33. ; Depending on the used Memory Manager this may cause some incompatibilities.
  34. ;opcache.fast_shutdown=0

  35. ; Allow file existence override (file_exists, etc.) performance feature.
  36. ;opcache.enable_file_override=0

  37. ; A bitmask, where each bit enables or disables the appropriate OPcache
  38. ; passes
  39. ;opcache.optimization_level=0xffffffff

  40. ;opcache.inherited_hack=1
  41. ;opcache.dups_fix=0

  42. ; The location of the OPcache blacklist file (wildcards allowed).
  43. ; Each OPcache blacklist file is a text file that holds the names of files
  44. ; that should not be accelerated. The file format is to add each filename
  45. ; to a new line. The filename may be a full path or just a file prefix
  46. ; (i.e., /var/www/x  blacklists all the files and directories in /var/www
  47. ; that start with 'x'). Line starting with a ; are ignored (comments).
  48. ;opcache.blacklist_filename=

  49. ; Allows exclusion of large files from being cached. By default all files
  50. ; are cached.
  51. ;opcache.max_file_size=0

  52. ; Check the cache checksum each N requests.
  53. ; The default value of "0" means that the checks are disabled.
  54. ;opcache.consistency_checks=0

  55. ; How long to wait (in seconds) for a scheduled restart to begin if the cache
  56. ; is not being accessed.
  57. ;opcache.force_restart_timeout=180

  58. ; OPcache error_log file name. Empty string assumes "stderr".
  59. ;opcache.error_log=

  60. ; All OPcache errors go to the Web server log.
  61. ; By default, only fatal errors (level 0) or errors (level 1) are logged.
  62. ; You can also enable warnings (level 2), info messages (level 3) or
  63. ; debug messages (level 4).
  64. ;opcache.log_verbosity_level=1

  65. ; Preferred Shared Memory back-end. Leave empty and let the system decide.
  66. ;opcache.preferred_memory_model=

  67. ; Protect the shared memory from unexpected writing during script execution.
  68. ; Useful for internal debugging only.
  69. ;opcache.protect_memory=0

  70. ; Allows calling OPcache API functions only from PHP scripts which path is
  71. ; started from specified string. The default "" means no restriction
  72. ;opcache.restrict_api=

  73. ; Mapping base of shared memory segments (for Windows only). All the PHP
  74. ; processes have to map shared memory into the same address space. This
  75. ; directive allows to manually fix the "Unable to reattach to base address"
  76. ; errors.
  77. ;opcache.mmap_base=

  78. ; Enables and sets the second level cache directory.
  79. ; It should improve performance when SHM memory is full, at server restart or
  80. ; SHM reset. The default "" disables file based caching.
  81. ;opcache.file_cache=

  82. ; Enables or disables opcode caching in shared memory.
  83. ;opcache.file_cache_only=0

  84. ; Enables or disables checksum validation when script loaded from file cache.
  85. ;opcache.file_cache_consistency_checks=1

  86. ; Implies opcache.file_cache_only=1 for a certain process that failed to
  87. ; reattach to the shared memory (for Windows only). Explicitly enabled file
  88. ; cache is required.
  89. ;opcache.file_cache_fallback=1

  90. ; Enables or disables copying of PHP code (text segment) into HUGE PAGES.
  91. ; This should improve performance, but requires appropriate OS configuration.
  92. ;opcache.huge_code_pages=1

  93. ; Validate cached file permissions.
  94. ;opcache.validate_permission=0

  95. ; Prevent name collisions in chroot'ed environment.
  96. ;opcache.validate_root=0
复制代码




phpinfo 可以看到




这个什么情况呢?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-4-9 11:44:41 | 显示全部楼层



本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-4-9 11:45:01 | 显示全部楼层

/usr/local/php/bin/php --iniCLI 和 CGI 模式的 配置文件是 不同路径的
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-4-9 15:20:17 | 显示全部楼层



更新日志有说明已经不再修改php.ini,而是单独的conf.d目录下
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-27 09:30 , Processed in 0.027163 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表