Closed Nirjonadda closed 6 years ago
Just use pecl instal apcu_bc-beta
@remicollet So its are not goes to apcu_bc stable version?
Not work this the following commands. I am using cPanel CENTOS 7.4
# pecl instal apcu_bc-beta
-bash: pecl: command not found
@Nirjonadda there was a typo in the command -- should be "install", e.g.
pecl install apcu_bc-beta
However, this still doesn't seem to get the --enable-apcu-bc
option working.
php -m | grep apcu
this DOES show apcu installed, but the following script fails:
<?php
if (function_exists('apc_fetch')) {
print 'bc works';
}
Ok, I think I've figured this out. It would be hugely helpful if this were added to the README (or if there were a CONTRIBUTING file, users could submit their own updates to the docs). It's not very clear how to get this working on PHP 7 to support legacy apps that rely on the various apc_*
functions. PHP.net refers to a different compilation flag than what is required here (but you have to look at the source to see that).
pecl install apcu_bc-beta
# Or in Dockerfile, to get past the prompt, you can do something like:
printf '' | pecl install apcu_bc-beta
# add the .so to your ini file (adjust for your system's paths):
echo "extension=apcu.so" > /etc/php/7.1/cli/conf.d/apcu.ini
cd /tmp
git clone https://github.com/krakjoe/apcu-bc
cd apcu-bc
phpize
./configure --enable-apc \
make
make install
# add the .so to your ini file (adjust for your system's paths):
echo "extension=apcu.so" > /etc/php/7.1/cli/conf.d/apcu.ini
Now you should have functions like apcu_fetch()
which should be able to replace the legacy apc_fetch()
alternatives.
Closing as duplicate of #25 About README file, feel free to open a PR
Please let me know that when goes apcu_bc state "stable"? Can not install beta version.