gpt4 book ai didi

PHP7/MemCache 弃用错误消息

转载 作者:可可西里 更新时间:2023-10-31 23:05:32 24 4
gpt4 key购买 nike

我刚刚通过 Homebrew 更新到 PHP7。我现在在执行 php -v 时收到以下错误消息:

PHP Deprecated:  PHP Startup: memcached.sess_lock_wait and memcached.sess_lock_max_wait are deprecated. Please update your configuration to use memcached.sess_lock_wait_min, memcached.sess_lock_wait_max and memcached.sess_lock_retries in Unknown on line 0
Deprecated: PHP Startup: memcached.sess_lock_wait and memcached.sess_lock_max_wait are deprecated. Please update your configuration to use memcached.sess_lock_wait_min, memcached.sess_lock_wait_max and memcached.sess_lock_retries in Unknown on line 0
PHP Deprecated: PHP Startup: memcached.sess_lock_wait and memcached.sess_lock_max_wait are deprecated. Please update your configuration to use memcached.sess_lock_wait_min, memcached.sess_lock_wait_max and memcached.sess_lock_retries in Unknown on line 0
Deprecated: PHP Startup: memcached.sess_lock_wait and memcached.sess_lock_max_wait are deprecated. Please update your configuration to use memcached.sess_lock_wait_min, memcached.sess_lock_wait_max and memcached.sess_lock_retries in Unknown on line 0
PHP 7.0.2 (cli) (built: Jan 7 2016 10:40:26) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
with Xdebug v2.4.0RC3, Copyright (c) 2002-2015, by Derick Rethans

谁能告诉我哪里出错了?

我通过 Homebrew 列出并安装了以下软件包。

memcached php56-memcached php70-memcached

谢谢。

最佳答案

我不得不在/usr/local/etc/php/7.0/conf.d/ext-memcached.ini 中注释掉以下条目。

;memcached.sess_lock_wait = 150000
;memcached.sess_lock_max_wait = 0;

数字以微秒为单位(参见 http://php.net/manual/en/memcached.configuration.php )

PHP 7.0+ 中的新设置是:

; The minimum time, in milliseconds, to wait between session lock attempts.
; This value is double on each lock retry until memcached.sess_lock_wait_max
; is reached, after which any further retries will take sess_lock_wait_max seconds.
; Default is 1000.

memcached.sess_lock_wait_min = 1000;

; The maximum time, in milliseconds, to wait between session lock attempts.
; Default is 2000.

memcached.sess_lock_wait_max = 2000;

; The number of times to retry locking the session lock, not including
; the first attempt.
; Default is 5.

memcached.sess_lock_retries = 5;

来源:https://github.com/php-memcached-dev/php-memcached/blob/master/memcached.ini

关于PHP7/MemCache 弃用错误消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35130463/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com