APC PHP 5.6 does not work

826 views
Skip to first unread message

Alejandro Aguilera

unread,
Jan 15, 2016, 4:24:36 AM1/15/16
to ICA-AtoM Users
Hey there,

I managed to install version 2.2 of Atom in PHP 5.4.2, but I can not do it on a version 5.6, is there any way to install the APC in this version?

Thx!

Dan Gillean

unread,
Jan 15, 2016, 5:57:39 PM1/15/16
to ICA-AtoM Users
Hi there,

We did receive a similar report from a user recently with the same issue, in this thread:

In the end, that user downgraded to PHP 5.5. However, I'm looking into this a bit myself now, and the short answer, I think, is to use APCu instead. Here are some further thoughts... but please note, I am not a developer, so I might have this wrong.

First, there is a difference between APC, and APCu - and I believe that for newer versions of PHP, we recommend using APCu.

The difference is explained in this StackExchange thread:

The mix up is usually because these extensions are about two unrelated technologies: opcode caching and key-value data store. ... Opcode caching is really the "normal" way to run PHP (and lack of it is essentially crippled shared hosting way). ...

So out of those you named:

  • APC is opcode cache and data store
  • APCu is only data store
  • OPcache is only opcode cache

APCu was a fork created from APC, which removed the opcode cache. As I understand it, with PHP 5.5, Opcache, now powered by the Zend engine, is bundled with PHP 5.5 and later versions, but was only available via PECL for PHP 5.2-5.4:

In Ubuntu, PHP 5.5 is included by default in the 14.04 release, but not in the 12.04 release. Anticipating this, we made AtoM's cacheing needs work with BOTH APC, or APCu +Opcache. You can see that either APC or APCu will work in the AtoM configuration files - specifically, by looking at config/app.yml:


In the PHP sample configuration block there is a section that includes a sample configuration for the Zend OPCache - and we recommend removing it if you are using Ubuntu 12.04:

# Zend OPcache
# Only in Ubuntu 14.04 (PHP 5.5).
# Don't use this in Ubuntu 12.04, it won't work.
php_admin_value[opcache.enable] = 1
php_admin_value[opcache.enable_cli] = 0
php_admin_value[opcache.memory_consumption] = 192
php_admin_value[opcache.interned_strings_buffer] = 16
php_admin_value[opcache.max_accelerated_files] = 4000
php_admin_value[opcache.validate_timestamps] = 0
php_admin_value[opcache.fast_shutdown] = 1

Note that the section “Zend OPcache” won’t work in Ubuntu 12.04. Comment it out or remove it unless you are using Ubuntu 14.04.

See:

Based on this, it seems to me that if you want to use PHP 5.6, you should be able to simply use APCu, with Zend OPCache, and make sure that the sample OPcache block above is included in your PHP pool, found at /etc/php5/fpm/pool.d/atom.conf if you have followed our recommended installation instructions.

This link is for a very different project, but it has further information on PHP, APC, and APCu you might find helpful:

Let us know if using APCu instead works?

Cheers,



Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory

--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/86ae931d-0078-49a1-84b8-cc6124e8fc4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages