Symfony/PHP7 APC->铜铜合金 [英] Symfony / PHP7 APC -> APCu

查看:50
本文介绍了Symfony/PHP7 APC->铜铜合金的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对PHP7和APCu有问题.安装后出现此错误:

I have issue with PHP7 and APCu. After installation I got this error:

Fatal error: Call to undefined function Doctrine\Common\Cache\apc_fetch()

APCu已100%启用,我在phpinfo();中看到了它,当我尝试apcu_fetch()时,它起作用了.

APCu is 100% enabled, I see it in the phpinfo(); And when I try apcu_fetch() it works.

如何在Symfony 2.8中使用APCu?

How to use APCu in Symfony 2.8?

推荐答案

此答案已过时.正确的答案是弗朗索瓦·布雷顿(FrançoisBreton)的答案.

This answer is obsolet. The correct answer is the one from François Breton.

在PHP 7中,您必须向PHP设置中添加一个附加模块:apc.so 这是一个模块,可以向后兼容apcu的apc. 这有点令人困惑...

In PHP 7 you have to add an additional module to your PHP setup: apc.so This is a module that enables backward compability to apc for apcu. This is kind of confusing...

请参见 http://php.net/manual/de/apcu.installation. php 了解更多信息.

如果您使用的是 https://deb.sury.org/中的软件包(ondrej ppa) ,您可以通过apt-get install php-apcu-bc安装它.

If you are using packages from https://deb.sury.org/ (ondrej ppa), you can install it via apt-get install php-apcu-bc.

这篇关于Symfony/PHP7 APC->铜铜合金的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆