lcache / wp-lcache

A WordPress implementation of LCache
https://wordpress.org/plugins/wp-lcache/
GNU General Public License v2.0
88 stars 5 forks source link

Missing APCU extension enabled with extension enabled ... #103

Closed abumalick closed 7 years ago

abumalick commented 7 years ago

Hello, I get a Missing APCU extension enabled and I have the extension enabled.

wp plugin activate wp-lcache
Warning: Warning! Missing APCu extension enabled, which is required by WP LCache object cache. See "Installation" for more details: https://wordpress.org/plugins/wp-lcache/installation/
Success: Plugin 'wp-lcache' activated.

I am on shared hosting and I can active apcu extension in cpanel. I tried with php5.6 and php 7.0 . I get the same warning message. Note : I have access to server with ssh, I can use php cli and composer but no root. I use wordpress under bedrock from roots

Any idea ?

Here is phpconfig output :

In my phpconfig() I have for php 5.4 :

apc

APC support | Emulated

apcu

APCu Support Enabled
Version 4.0.11
APCu Debugging Disabled
MMAP Support Enabled
MMAP File Mask no value
Serialization Support php
Revision $Revision: 328290 $
Build Date Aug 1 2016 13:21:57
Directive Local Value Master Value
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

In my phpconfig() I have for php 7.0

PHP Version => 7.0.12

apcu

APCu Support Enabled
Version 5.1.5
APCu Debugging Disabled
MMAP Support Enabled
MMAP File Mask no value
Serialization Support php
Build Date Sep 1 2016 03:44:50
Directive Local Value Master Value
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.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
abumalick commented 7 years ago

I have this path in my object-cache.php due to different structure of bedrock:

$lcache_path = dirname( realpath( __FILE__ ) ) . '../../app/plugins/wp-lcache/object-cache.php';
require_once( $lcache_path );

But I get the same error when I change the path or remove this file.

danielbachhuber commented 7 years ago

@abumalick You need to apc.enable_cli='on' too

abumalick commented 7 years ago

Can you tell me how I should activate this ? I see no option for this in cpanel and I don't have access to php.ini . Can I activate it in htaccess ?

abumalick commented 7 years ago

Tried to put this in htaccess but it don' t work php_flag apc.enable_cli On

danielbachhuber commented 7 years ago

Can you tell me how I should activate this ? I see no option for this in cpanel and I don't have access to php.ini .

It'll need to be set in your php.ini.

Run wp --info to see then path to your php.ini for CLI.

.htaccess is only executed for a web request.

abumalick commented 7 years ago

Thank you very much for your help, I asked my provider and they gave me an option in cpanel to activate it. Now it seems to work, but I have another issue, I will create another thread