If you try to install PHP APC 3.1.5 through PHP PEAR and encounter errors regarding phpize or the following:

[code lang=“bash”]/usr/include/php5/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory[/code]

…well don’t worry. You’re missing a few components. For phpize, you’ll need the php5-dev that you can fetch from Ubuntu. For the php_prce.h error, you’ll need pcre3-dev package which is essentially Perl 5 Compatible Regular Expression Library – development files.

Perform the following and install PHP APC using PECL again:

[code lang=“bash”]sudo apt-get install libpcre3-dev php5-dev

sudo pecl install apc-3.1.5[/code]

And it’s done:

[code lang=“bash”]Build process completed successfully

Installing ‘/usr/lib/php5/20090626+lfs/apc.so’

install ok: channel://pecl.php.net/APC-3.1.5

configuration option “php_ini” is not set to php.ini location

You should add “extension=apc.so” to php.ini[/code]

This is tested against Ubuntu 10.04 as well as Ubuntu 10.10 environments.

You can add it to /etc/php5/conf.d/apc.ini by:

[code lang=“bash”]nano /etc/php5/conf.d/apc.ini[/code]

Add in the following codes:

[code lang=“php”]







apc.rfc1867=1 //For Drupal upload progress.

apc.stat=7200 //2 hours


comments powered by Disqus