How To Install PHP Pecl for 5.3.x with APC Module
If you are looking to improve performance on your apache web server there is a PHP module that is from the PHP extension community library named Alternative PHP Cache. This APC module will cache and optimize your PHP webpages speeding up content delivery. Here are directions how to install this package.
Follow the steps below to install php and the apc module:
yum install php53 php53-devel php-pear pcre pcre-devel gcc cpp make autoconf
Next to install apc use the pecl command line installer
pecl install apc 54 source files, building running: phpize Configuring for: PHP Api Version: 20090626 Zend Module Api No: 20090626 Zend Extension Api No: 220090626 Enable internal debugging in APC [no] : Enable per request file info about files used from the APC cache [no] : Enable spin locks (EXPERIMENTAL) [no] : Enable memory protection (EXPERIMENTAL) [no] : Enable pthread mutexes (default) [yes] : Enable pthread read/write locks (EXPERIMENTAL) [no] :
This pecl installer will configure your apache installation automatically if you installed apache. Some problems can arise when installing usually due to missing packages, see an example of a missing package below.
/usr/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory In file included from /tmp/tmpia0OKv/APC-3.1.9/apc.c:44: /usr/include/php/ext/pcre/php_pcre.h:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token /usr/include/php/ext/pcre/php_pcre.h:38: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token /usr/include/php/ext/pcre/php_pcre.h:44: error: expected specifier-qualifier-list before 'pcre' /tmp/tmpia0OKv/APC-3.1.9/apc.c:393: error: expected specifier-qualifier-list before 'pcre' /tmp/tmpia0OKv/APC-3.1.9/apc.c: In function 'apc_regex_compile_array': /tmp/tmpia0OKv/APC-3.1.9/apc.c:454: error: 'apc_regex' has no member named 'preg' /tmp/tmpia0OKv/APC-3.1.9/apc.c:454: error: 'apc_regex' has no member named 'preg' /tmp/tmpia0OKv/APC-3.1.9/apc.c:455: error: 'apc_regex' has no member named 'nreg' /tmp/tmpia0OKv/APC-3.1.9/apc.c:455: error: 'apc_regex' has no member named 'nreg' /tmp/tmpia0OKv/APC-3.1.9/apc.c: In function 'apc_regex_match_array': /tmp/tmpia0OKv/APC-3.1.9/apc.c:487: error: 'apc_regex' has no member named 'preg' /tmp/tmpia0OKv/APC-3.1.9/apc.c:487: error: 'apc_regex' has no member named 'preg' /tmp/tmpia0OKv/APC-3.1.9/apc.c:488: error: 'apc_regex' has no member named 'nreg' /tmp/tmpia0OKv/APC-3.1.9/apc.c:488: error: 'apc_regex' has no member named 'nreg' make: *** [apc.lo] Error 1 ERROR: `make' failed
If you come across this error then the make sure to install pcre and pcre-devel with yum.
Thank you.
Your advice fixed the compilation process.
All went nice and smooth.
thx again.
Great news, glad I could help you out.
Thanks, Thanks, Thanks, Thanks, and Thanks.