且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

APC是否与PHP 5.4或PHP 5.5兼容?

更新时间:2023-12-05 10:05:58

PHP 5.5中包含的Zend OPCache

2013年3月21日,发布了 PHP 5.5 beta 1包括"Zend OPCache" -看来它将成为APC的替代品,因为它已包含在PHP核心中,并且必须针对每个新版本进行维护.

我个人会建议那些依靠APC进行操作码缓存的用户使用即将推出的内置操作码缓存来测试其代码,并反馈遇到的任何问题以确保稳定的最终版本.

我不知道这对APC的未来意味着什么.

PHP 5.4+的APC仍然是测试版错误

这意味着开发人员认为它完全稳定.尽管许多人对当前的SVN版本完全没有遇到任何问题,但仍然有奇怪的报道,指出在某些配置下或负载很重的情况下,人们会遇到边缘情况.

与您要在生产环境中使用的所有内容一样,请确保先在开发或预生产环境中全面测试任何发行版(测试版稳定版) .这包括负载测试!

从3.1.13版本开始,对SVN存储库的提交速度有所减慢,并且错误列表,看看他们是否可以解决任何问题,或改进我们所提供的免费开源产品都依靠.

存在其他解决方案,***提供了 PHP加速器列表.

2013年2月13日, Zeev Suraski宣布 Zend Optimizer +源代码的可用性.

已经有相当多的关于将Zend Optimizer +集成到下一个主要版本(5.5之后的版本)的PHP核心.在这种情况下,人们可能希望提前熟悉Zend Optimizer +.


请勿使用APC 3.1.14

APC 3.1.14已从PECL中删除下载是由于发现了一些严重的内存问题,但尚未找到.

如果您已经在使用3.1.14,则可能希望降级,直到发布3.1.15.请记住,这仍然是测试版.如果您完全使用它,则需要您自担风险.

2013-01-02 :
APC 3.1.14 可用 APC 3.1.13 可用, APC 3.1.12标签,但仍标记为 beta ,可在 APC PECL页上找到,以及更改日志.
这次修复了许多与bin_dump相关的错误.


2012-07-19 :
已创建 APC 3.1.11标签,但仍标记为 beta ,可在 APC PECL页上找到,以及更改日志.我一直在关注相关的邮件列表,他们仍在积极地修复APC错误,但是它是一个复杂的模块,似乎没有多少人能够胜任该任务.此版本修复了包含文件时令人讨厌的stat = 0错误.


2012-04-11 :
今天创建了一个 APC 3.1.10标签,并且在 APC PECL页面上放置了3.1.10的beta版本

更改日志指出:>

  • 添加PHP 5.4支持(Dmitry,Anatoliy,Pierre)
  • 已修复的错误#22679:修复了apc_bin_dump中的常量.使用IS_CONSTANT_TYPE_MASK处理所有常量,包括未量化的常量(而不是〜IS_CONSTANT_INDEX检查)
  • 已修复错误#23822,apache重新启动时php崩溃

It doesn't seem like APC has been updated to coincide with the php 5.4 release (I wish they would have included APC in PHP core like originally planned).

I can't seem to find any definitive answer to whether current APC works with php 5.4+. I managed to find Ubuntu packages for php 5.4, but php-apc packages won't install.

Zend OPCache included in PHP 5.5

On the 21st March 2013, the PHP 5.5 beta 1 was released including "Zend OPCache" - It looks firmly like this will be the replacement for APC going forward as it is included in the PHP core, and will have to be maintained for each new release.

I would personally advise those who depend on APC for it's opcode caching to test their code with the upcoming built-in opcode cache, and feed back any issues encountered to ensure a stable final release.

I do not know what this means for the future of APC.

APC FOR PHP 5.4+ IS STILL FLAGGED AS BETA

This means the developers do not consider it completely stable. While many people are experiencing no problems at all with the current SVN releases, there is still the odd report of edge cases from people under certain configurations, or under heavy load.

As with everything you would want to use in a production environment, make sure you thoroughly test any release (beta or stable) in development or pre-production environments first. This includes load testing!

As of the 3.1.13 release, commits to the SVN repository have slowed down somewhat and the bug list doesn't have that many recent additions. Make of that what you will.

On 10 December 2012 21:05, Rasmus Lerdorf wrote:

APC is at the point now for 5.4 where I don't think there are any more edge cases than we have in 5.3. Neither is perfect, but it is close enough for the majority of sites.

Anyone with C / gdb skills and some free time is urged to gloss over the bug list and see if they can fix anything, or improve this free open source product that we all rely on.

Alternative solutions exist, Wikipedia provides a list of PHP accelerators.

On the 13th of February 2013, Zeev Suraski announced the availability of the Zend Optimizer+ source code.

There has been quite a lengthy discussion about integrating Zend Optimizer+ into the PHP core in the next major version (the version after 5.5). People may wish to familiarise themselves with Zend Optimizer+ in advance, should this be the case.


Do not use APC 3.1.14

APC 3.1.14 has been removed from PECL downloads due to some serious memory issues that have been discovered but have not yet been tracked down.

If you're already using 3.1.14, you may wish to downgrade until 3.1.15 is released. Remember, this is still beta. If you are using it at all, you are using it at your own risk.

2013-01-02:
APC 3.1.14 is available, adding PHP 5.5 compatibility, in addition to resolving a fair number of other bugs.

Still beta


2012-09-03:
APC 3.1.13 is available, fixing a number of segfaults.


2012-08-16:
An APC 3.1.12 tag has been created, but is still marked as beta, its available on the APC PECL page, as well as the changelog.

Lots of bin_dump related bugs fixed this time around.


2012-07-19:
An APC 3.1.11 tag has been created, but is still marked as beta, its available on the APC PECL page, as well as the changelog. I've been following the relevant mailing lists, and they are still actively working on fixing APC bugs however it is a complex module and not many people seem to be up to the task. This release fixes the nasty stat=0 bugs when including files.


2012-04-11:
An APC 3.1.10 tag was created today, and a beta release of 3.1.10 was placed on the APC PECL page

The changelog states:

  • Add PHP 5.4 support (Dmitry, Anatoliy, Pierre)
  • Fixed bug #22679: Fix apc_bin_dump for constants. Use IS_CONSTANT_TYPE_MASK to handle all the constants, including the unqalified ones (instead of ~IS_CONSTANT_INDEX check)
  • Fixed bug #23822, php crashes on apache restart