Drupal8安装:Fatal error: Call to a member function setRecipients()......

本文介绍了如何通过修改PHP.ini文件来启用和配置OPcache,以此提高PHP应用的运行速度。具体步骤包括:停止Apache服务,修改PHP.ini设置,如启用OPcache、调整内存消耗等参数,并重启Apache服务。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. Stopped Apache.

2. Modified and saved PHP.ini file

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

; 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 100000 are allowed.
opcache.max_accelerated_files=4000

...

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

...

; If enabled, a fast shutdown sequence is used for the accelerated code
opcache.fast_shutdown=1

...
And, I added the zend_extension reference to the PHP.ini file [PHP] section -- important to add it in this section. I added it at the end of the "Paths and Directories" subsection of that PHP section:
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

...

; Tyme added to resolve install issue
zend_extension = "C:\xampp\php\ext\php_opcache.dll"

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

3. Restarted Apache.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值