• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved APC on PHP Version 5.6.27

robetus

Basic Pleskian
I've read about 4 different posts on this forum detailing different ways to enable APC but none of them work, with this new thread I'm hoping to create a clear precise method on how to enable APC for Onyx.

I installed APC successfully and php-devel for PHP 6 everything seems to be in the correct place and configured but APC will not show in PHP info.

I am running Plesk Onyx on CentOS 6.8. Any help would be greatly appreciated.
 
Hi robetus,

is there a reason, why you don't provide more informations about your previous investigations and the corresponding results, why possible suggestions didn't work for you?
This suggestion for example is pretty clear ( for APCU ): => #19

Are you sure, that you have installed apcu in the context of the desired php version?

E.g. (for php 5.6.10, untested):

1. Install the corresponding php devel-package
2. Install apcu in the context of the right php-version:

cd /opt/plesk/php/5.6/bin
./pecl config-set php_ini /opt/plesk/php/5.6/etc/php.ini
./pecl config-set php_bin /opt/plesk/php/5.6/bin/
./pear config-set php_suffix ""
./pecl install --force apcu

3. Include the apcu-extension

echo "extension=apcu.so" > /opt/plesk/php/5.6/etc/php.d/apcu.ini

4. Restart Apache

service httpd restart
or
service apache2 restart

5. Configure the desired vhost to use apcu

apc.enabled = 1
...
 
Last edited by a moderator:
1. done
2. I'm not too sure what you mean but I think it's installed. Is there a way I can confirm this?

When I run ./pecl config-set php_ini /opt/plesk/php/5.6/etc/php.ini I get:
Code:
# ./pecl config-set php_ini /opt/plesk/php/5.6/etc/php.ini

PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/plesk/php/5.6/lib64/php/modules/apcu.so' - /opt/plesk/php/5.6/lib64/php/modules/apcu.so: cannot open shared object file: No such file or directory in Unknown on line 0

config-set succeeded
 
Hi robetus,

well... actually, your error message points directly to your issue: "No such file or directory in Unknown on line 0"

Pls. check, where you installed the *.so file on your server, with for example:

updatedb
locate apcu.so


( Pls. note: the command "updatedb" depends on the "mlocate" - package, which has to be installed on your server - the same with the command "locate" )
 
I cp apcu.so to /opt/plesk/php/5.6/lib64/php/modules/ so it's there now but I'm still getting this error:
Code:
# ./pecl config-set php_ini /opt/plesk/php/5.6/etc/php.ini

PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/plesk/php/5.6/lib64/php/modules/apcu.so' - /opt/plesk/php/5.6/lib64/php/modules/apcu.so: undefined symbol: pcre_exec in Unknown on line 0

config-set succeeded
 
Sorry robetus,

but this is absolutely the wrong way to solve your issue!

You should FIRST investigate, where the *.so - file has been placed during the installation with pecl and IF it is located in a wrong place on your server, pls. consider to provide correct informations, which steps you performed to install your apcu - module, which depends on the PHP version and is ONLY compiled for the depending PHP - version, which you used the "pecl" - command with. Copying from another location on your server to the wrong PHP - version will certainly produce errors like:
undefined symbol: pcre_exec in Unknown on line 0

Another reason for such error - messages is an unsuccessfull pecl - installation, which you certainly should check, when you performed the suggested commands above. Consider to provide the last lines of your pecl - installation from your command line, so that further investigations can be done.
 
I'm just going to quit. It's obviously not easy to install pecl and apc to a specific php version which is a shame. This is one thing that cpanel definitely has over plesk, it very easy to install a php cacher on cpanel. Thank you for your help UFHH01!
 
Hi robetus,

well if you decide to "quit", it's up to you... even that we really want to solve the issue together with you. But without possible informations, there is no chance to investigate want went wrong in your case. :(
 
Back
Top