我正在尝试在运行 Ubuntu 14.04 的服务器上启用 APC
当我运行以下命令时,APC 似乎已正确启用:
sudo php -i | grep "apc"
终端返回:
apc
apcu
apc.coredump_unmap => Off => Off
apc.enable_cli => Off => Off
apc.enabled => On => On
apc.entries_hint => 4096 => 4096
apc.gc_ttl => 3600 => 3600
apc.mmap_file_mask => no value => no value
apc.preload_path => no value => no value
apc.rfc1867 => Off => Off
apc.rfc1867_freq => 0 => 0
apc.rfc1867_name => APC_UPLOAD_PROGRESS => APC_UPLOAD_PROGRESS
apc.rfc1867_prefix => upload_ => upload_
apc.rfc1867_ttl => 3600 => 3600
apc.serializer => php => php
apc.shm_segments => 1 => 1
apc.shm_size => 32M => 32M
apc.slam_defense => On => On
apc.smart => 0 => 0
apc.ttl => 0 => 0
apc.use_request_time => On => On
apc.writable => /tmp => /tmp
另外,当我访问 apc.php 时,页面按预期加载,但没有可用信息。日期值混乱:
最后,这里有我的配置(/etc/php5/cli/conf.d/20-apcu.ini):
extension=apcu.so
apc.shm_size=10000
apc.ttl=0
apc.gc_ttl=3600
apc.stat=1
apc.max_file_size = 100M
答案1
APC 无法在 php 5.5 上运行,请尝试使用 php 5.5 上默认安装的 opcache ->http://php.net/manual/en/book.opcache.php
您可以阅读此回复以了解更多信息 ->https://stackoverflow.com/a/10109553/1530342