PHP 7.4.0RC4 Released!


この » PECL 拡張 モジュールは PHP にバンドルされていません。

この PECL 拡張モジュールをインストールする方法は、 マニュアルの PECL 拡張モジュールのインストール という章にあります。 新規リリース・ダウンロード・ソースファイル・管理者情報・CHANGELOG といった関連する情報については、次の場所にあります。 »

この PECL 拡張モジュールの DLL は、現在存在しません。 Windows でのビルド も参照ください

注意: Windows 版の APC では、temp パスが存在し、 Web サーバーから書き込み可能になっていることが必要です。 APC は環境変数 TMP、TEMP、USERPROFILE の内容をこの順に調べ、 どれも設定されていない場合は WINDOWS ディレクトリを使用します。

注意: さらに深く踏み込んだ、実装についての高度な技術情報は、 »  developer-supplied TECHNOTES file を参照ください。

add a note add a note

User Contributed Notes 12 notes

61924 dot 00 at gmail dot com
10 years ago
sudo apt-get install php-apc
sudo /etc/init.d/apache2 restart

Was enough for me. I use Ubuntu Server 8.10.
scarywound at gmail com
7 years ago
Pay attention to the fact that installing php-apc package gives you APC version 3.1.3p1, which is according to UNSTABLE. If you want the latest STABLE edition (3.1.9 by now), you should use 'sudo pecl install apc' instead.
flydian80 at yahoo dot com
7 years ago
Install successfully on RHEL5 with user-defined path. In case someone needs it, I put the steps here.

I am not the su user and don't have its right too. Basically I installed the Apache and PHP 5.3.10 on the folder under my user directory.
My user directoy like /home/dxxx, php is at /home/dxxx/php, apache is at /home/dxxx/php.

1: I get APC-3.1.9.tar.gz from PECL and put in at /home/dxxx/php/etc.
2: /home/dxxx/php/etc: tar -xvfz APC-3.1.9.tar.gz
3: We get a folder named APC-3.1.9, then cd APC-3.1.9
4: /home/dxxx/php/etc/APC-3.1.9: /home/dxxx/php/bin/./phpize ( because I installed php on user-defined foler, need to go there to find the "phpize")
It shows:
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626

5: /home/dxxx/php/etc/APC-3.1.9: ./config --with-php-config=/home/dxxx/php/bin/php-config --enable-apc --enable-apc-debug ( Because I am asked to put --with-php-config=PATH, if I don't provide it)

--Ignore the output message

6: /home/dxxx/php/etc/APC-3.1.9: make
We should be able to see a "" file under modules/.

7:  /home/dxxx/php/etc/APC-3.1.9: make install
This step copies that "" file to your extension folder. We can do it manually either.

8: Add to you php.ini, then restart the apache server

9: /home/dxxx/php/etc/APC-3.1.9: /home/dxxx/php/bin/./php -m
We should be able to see the "apc" on the list
toby at telegraphics dot com dot au
10 years ago
On Gentoo,

# emerge pecl-apc

Check installation:

$ php -r 'phpinfo();' |grep apc
additional .ini files parsed => /etc/php/cli-php5/ext-active/apc.ini,
apc.cache_by_default => On => On
apc.coredump_unmap => Off => Off
apc.enable_cli => Off => Off
apc.enabled => On => On
apc.file_update_protection => 2 => 2
apc.filters => no value => no value
apc.gc_ttl => 3600 => 3600
apc.include_once_override => Off => Off
apc.max_file_size => 1M => 1M
apc.num_files_hint => 1024 => 1024
apc.report_autofilter => Off => Off
apc.rfc1867 => Off => Off
apc.rfc1867_freq => 0 => 0
apc.rfc1867_prefix => upload_ => upload_
apc.shm_segments => 1 => 1
apc.shm_size => 30 => 30
apc.slam_defense => 0 => 0
apc.stat => On => On
apc.stat_ctime => Off => Off
apc.ttl => 7200 => 7200
apc.user_entries_hint => 4096 => 4096
apc.user_ttl => 7200 => 7200
apc.write_lock => On => On
suhosin.apc_bug_workaround => Off => Off
JoeB at modernizedmedia dot com
3 years ago
After spending a few hours investigating this I have come to learn that as of php 5.5, there is an opcode cache built into php that you should use instead of wrestling with trying to install this one.  Especially on WAMP.
nhhecker+php_net at gmail dot com
5 years ago
The below steps should work on Red Hat Enterprise Linux (RHEL) 6.x / CentOS 6.x. By way of introduction I had a bit of trouble installing php-devel but finally found an RPM on that wold work with my version of php...
  # yum install gcc automake php httpd httpd-devel
  # yum list installed | grep php
  # rpm -Uvh

With that out ofthe way, I could continue the installation of APC...
  # yum install php-pear
  # pecl install apc
  # echo "" >> /etc/php.ini
  # echo "apc.enabled=1" >> /etc/php.ini
  # cp /usr/share/pear/apc.php /var/www/html/apc.php (this step is optional)
  # /etc/init.d/httpd restart

Finally, test opening the apc.php file in a Web browser if you opted to copy the file. If all goes well, you may want to delete the apc.php file when you're done.

adonis at aynacorp dot com
6 years ago
Installation Steps For on Centos 6.3 / PHP 5.3.3

#use pecl to install it (you will be prompted during installation, I used the default values)
pecl install apc

# you should see something like this
downloading APC-3.1.9.tgz ...
Starting to download APC-3.1.9.tgz (155,540 bytes)
54 source files, building
running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Build process completed successfully
Installing '/usr/lib64/php/modules/'
Installing '/usr/include/php/ext/apc/apc_serializer.h'
install ok: channel://

#Great now that it is built,
#enable apc in php.ini
nano /etc/php.ini

# somewhere in you php.ini file add please not that path may be different for you installation

# copy the shipped apc.php to see what is going on wit apc on your server
cp /usr/share/pear/apc.php /root_dir_of_your_web_app

# now you should be able to see stats of APC running
brian at diamondsea dot com
8 years ago
When installing on Plesk and cPanel machines, I get the following error message:

[root@web1 ~]# pecl install apc
downloading APC-3.1.9.tgz ...
Starting to download APC-3.1.9.tgz (155,540 bytes)
.................................done: 155,540 bytes
54 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
/usr/bin/phpize: /tmp/pear/temp/APC/build/shtool: /bin/sh: bad interpreter: Permission denied
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

ERROR: `phpize' failed

The problem is caused by the /tmp/ filesystem being mounted noexec, which keeps any programs on /tmp/ from being allowed to be executed, which breaks the install script. 

To remount /tmp/ as executable, use:

[root@web1 ~]# mount -o remount,exec,suid /tmp

The it should install correctly.

After the install is done, remount the /tmp/ filesystem with the noexec permissions reset.

[root@web1 ~]# mount -o remount,noexec,nosuid /tmp
7 years ago
On my Debian Squeeze 64-bit I also had to install the package "apache2-threaded-dev" with this command "apt-get install apache2-threaded-dev". Afterwards I did "pecl install apc" and everything seemed to work fine.
11 years ago
debian etch installation

apt-get install apache2
apt-get install libapache2-mod-php5
apt-get install php-pear
apt-get install php5-dev
apt-get install make
apt-get install apache2-prefork-dev
pecl install apc

apache2-prefork-dev is necessary for not having the
"Sorry, I was not able to successfully run APXS."
pr at outwit dot com
10 years ago
Installed successfully on different FreeBSD servers, with mmap and IPC semaphores, but I got an error on a 64 bits box :

apc_sem_create: semctl(65536,...) failed: Result too large

I had to increase maximum semaphore value :

# sysctl kern.ipc.semvmx=131068
kern.ipc.semvmx: 32767 -> 131068
# echo "kern.ipc.semvmx=131068" >>  /etc/sysctl.conf

Works like a charm.
11 years ago
On Ubuntu I had to install the apache2-threaded-dev package.  It's the the Etch repos.
To Top