APC breaks login page?

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Posts: 33
Joined: Wed Dec 29, 2010 10:23 pm

APC breaks login page?

Postby lednakashim » Sat Aug 25, 2012 4:14 pm

I installed a fresh copy of APC from the amazon ec2 yum repository and I was no longer able to login my OJS user panel. Other parts of the website seemed to work. When i disabled APC everything returned to normal. I think our site could greatly benefit from some kind of caching strategy.

1. Does anybody know what could be going on?

2. Does anybody have an APC configuration that they would be kind enough to share?

3. What do you folks use to cache?

My ojs config was (toggling object_cache to APC didn't fix the problem)

Code: Select all

object_cache = none
web_cache = OFF
web_cache_hours = 1

And my apc.ini is

Code: Select all

[root php.d]# cat apc.ini
; Enable apc extension module
extension = apc.so

; Options for the APC module version >= 3.1.3
; See http://www.php.net/manual/en/apc.configuration.php

; This can be set to 0 to disable APC.
; The number of shared memory segments to allocate for the compiler cache.
; The size of each shared memory segment, with M/G suffixe
; A "hint" about the number of distinct source files that will be included or
; requested on your web server. Set to zero or omit if you are not sure;
; Just like num_files_hint, a "hint" about the number of distinct user cache
; variables to store.  Set to zero or omit if you are not sure;
; The number of seconds a cache entry is allowed to idle in a slot in case this
; cache entry slot is needed by another entry.
; use the SAPI request start time for TTL
; The number of seconds a user cache entry is allowed to idle in a slot in case
; this cache entry slot is needed by another entry.
; The number of seconds that a cache entry may remain on the garbage-collection list.
; On by default, but can be set to off and used in conjunction with positive
; apc.filters so that files are only cached if matched by a positive filter.
; A comma-separated list of POSIX extended regular expressions.
; The mktemp-style file_mask to pass to the mmap module
; This file_update_protection setting puts a delay on caching brand new files.
; Setting this enables APC for the CLI version of PHP (Mostly for testing and debugging).
; Prevents large files from being cached
; Whether to stat the main script file and the fullpath includes.
; Vertification with ctime will avoid problems caused by programs such as svn or rsync by making
; sure inodes have not changed since the last stat. APC will normally only check mtime.
; Whether to canonicalize paths in stat=0 mode or fall back to stat behaviour
; With write_lock enabled, only one process at a time will try to compile an
; uncached script while the other processes will run uncached
; Logs any scripts that were automatically excluded from being cached due to early/late binding issues.
; RFC1867 File Upload Progress hook handler
apc.rfc1867_prefix =upload_
; Optimize include_once and require_once calls and avoid the expensive system calls used.
; Enables APC handling of signals, such as SIGSEGV, that write core files when signaled.
; APC will attempt to unmap the shared memory segment in order to exclude it from the core file
; Records a md5 hash of files.
; not documented

Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: APC breaks login page?

Postby asmecher » Sat Aug 25, 2012 8:32 pm

Hi lednakashim,

APC (like Zend Optimizer and XCache and any other PHP opcode cache) should work transparently but in the case of at least one buggy release of APC that is not the case. I've heard that upgrading to newer releases of APC resolves the problem but haven't investigated specific versions in detail. We've had good success with XCache.

Alec Smecher
Public Knowledge Project Team

Posts: 33
Joined: Wed Dec 29, 2010 10:23 pm

Re: APC breaks login page?

Postby lednakashim » Mon Aug 27, 2012 1:40 am

Thanks for the direction, xcache seems be working.

Return to “OJS Technical Support”

Who is online

Users browsing this forum: No registered users and 1 guest