Browse Source

Changed php.ini to use OPcache

PHP >= 5.5 use OPcache.
Set option to not validate files timestamps, to avoid  filesystem overhead (recommended in production). Same option than apc.stat = 0.
Other options commented as don't work with all frameworks.
Commented apc config ( default memory size in opcache is 64M )
Joan Miquel 9 years ago
parent
commit
e47c146d4c
1 changed files with 11 additions and 4 deletions
  1. 11 4
      config/php.ini

+ 11 - 4
config/php.ini

@@ -1865,10 +1865,17 @@ ldap.max_links = -1
 ; Local Variables:
 ; tab-width: 4
 ; End:
-[apc]
-apc.stat = 0
-apc.enable_cli = 1
-apc.shm_size = 64M
+;[apc]
+;apc.stat = 0
+;apc.enable_cli = 1
+;apc.shm_size = 64M
+
+[opcache]
+opcache.validate_timestamps = 0 ; The same that apc.stat = 0
+;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
+
 
 [yaf]
 yaf.library =