Browse Source

the default cache size too low for php frameworks (#3037)

the default php.ini config is not suitable for php fameworks (symfony/laravel) that open many PHP files, especially on Windows systems.
omar soufiane 7 years ago
parent
commit
14b65e9124
1 changed files with 4 additions and 3 deletions
  1. 4 3
      toolset/setup/linux/languages/php/php.ini

+ 4 - 3
toolset/setup/linux/languages/php/php.ini

@@ -339,13 +339,13 @@ disable_classes =
 ; be increased on systems where PHP opens many files to reflect the quantity of
 ; the file operations performed.
 ; http://php.net/realpath-cache-size
-;realpath_cache_size = 16k
+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.
 ; http://php.net/realpath-cache-ttl
-;realpath_cache_ttl = 120
+realpath_cache_ttl = 600
 
 ; Enables or disables the circular reference collector.
 ; http://php.net/zend.enable-gc
@@ -1873,6 +1873,7 @@ ldap.max_links = -1
 
 [opcache]
 opcache.validate_timestamps = 0 ; The same that apc.stat = 0
+opcache.max_accelerated_files = 20000
 ;opcache.enable_file_override = 1 ; Faster for some frameworks
 ;opcache.save_comments = 0 ; Breaks any fw using annotations comments
 ;opcache.fast_shutdown = 1 ; Have problems with some big frameworks
@@ -1888,4 +1889,4 @@ yaf.name_suffix = 1
 yaf.name_separator=
 yaf.cache_config = 1
 yaf.environ = product
-yaf.use_namespace = 1
+yaf.use_namespace = 1