PHP 5.3.9 Unable to load dynamic library /apc.so?

Support/Development for PHP
Funboy
Forum User
Forum User
Posts: 54
Joined: Wed Aug 05, 2009 4:33 am

PHP 5.3.9 Unable to load dynamic library /apc.so?

Unread post by Funboy »

Hi,

Since doing my atomic PHP update last night I am now seeing the following error message? Can anyone point me in the correct direction to fix this please. (I know doubt its a stupidly simply command :) )
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/apc.so' - /usr/lib64/php/modules/apc.so: undefined symbol: pcre_exec in Unknown on line 0
I get the following when trying to install CentovaCast.
]# ./install.sh
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/apc.so' - /usr/lib64/php/modules/apc.so: undefined symbol: pcre_exec in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/apc.so' - /usr/lib64/php/modules/apc.so: undefined symbol: pcre_exec in Unknown on line 0
Your PHP CLI binary does not appear to be working correctly. Please correct this problem and then restart this installation script.
*** SYSTEM ***

Paralles Plesk Panel
]# rpm -q psa
psa-10.4.4-cos6.build1013111102.18.x86_64
Apache
]# httpd -v
Server version: Apache/2.2.15 (Unix)
Server built: Dec 8 2011 18:10:49
PHP
]# php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/apc.so' - /usr/lib64/php/modules/apc.so: undefined symbol: pcre_exec in Unknown on line 0
PHP 5.3.9 (cli) (built: Jan 17 2012 15:33:37)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with the ionCube PHP Loader v4.0.10, Copyright (c) 2002-2011, by ionCube Ltd
MySQL
]# mysql -V
mysql Ver 14.14 Distrib 5.5.20, for Linux (x86_64) using readline 5.1
CentOS
]# cat /etc/*release*
CentOS release 6.2 (Final)
CentOS release 6.2 (Final)
CentOS release 6.2 (Final)
cpe:/o:centos:linux:6:GA
In an attempt to understand what's wrong and after trawling the web for solutions to this problems which seems to have hit so many I thought best to double check the appropriate files.

My apc.ini is correctly located in /etc/php.d and contains the following:
; Enable apc extension module
extension = apc.so

; Options for the APC module version >= 3.1.3
; See http://www.php.net/manual/en/apc.configuration.php

; This can be set to 0 to disable APC.
apc.enabled=1
; The number of shared memory segments to allocate for the compiler cache.
apc.shm_segments=1
; The size of each shared memory segment, with M/G suffixe
apc.shm_size=64M
; A "hint" about the number of distinct source files that will be included or
; requested on your web server. Set to zero or omit if you are not sure;
apc.num_files_hint=1024
; Just like num_files_hint, a "hint" about the number of distinct user cache
; variables to store. Set to zero or omit if you are not sure;
apc.user_entries_hint=4096
; The number of seconds a cache entry is allowed to idle in a slot in case this
; cache entry slot is needed by another entry.
apc.ttl=7200
; use the SAPI request start time for TTL
apc.use_request_time=1
; The number of seconds a user cache entry is allowed to idle in a slot in case
; this cache entry slot is needed by another entry.
apc.user_ttl=7200
; The number of seconds that a cache entry may remain on the garbage-collection list.
apc.gc_ttl=3600
; On by default, but can be set to off and used in conjunction with positive
; apc.filters so that files are only cached if matched by a positive filter.
apc.cache_by_default=1
; A comma-separated list of POSIX extended regular expressions.
apc.filters
; The mktemp-style file_mask to pass to the mmap module
apc.mmap_file_mask=/tmp/apc.XXXXXX
; This file_update_protection setting puts a delay on caching brand new files.
apc.file_update_protection=2
; Setting this enables APC for the CLI version of PHP (Mostly for testing and debugging).
apc.enable_cli=0
; Prevents large files from being cached
apc.max_file_size=1M
; Whether to stat the main script file and the fullpath includes.
apc.stat=1
; Vertification with ctime will avoid problems caused by programs such as svn or rsync by making
; sure inodes have not changed since the last stat. APC will normally only check mtime.
apc.stat_ctime=0
; Whether to canonicalize paths in stat=0 mode or fall back to stat behaviour
apc.canonicalize=0
; With write_lock enabled, only one process at a time will try to compile an
; uncached script while the other processes will run uncached
apc.write_lock=1
; Logs any scripts that were automatically excluded from being cached due to early/late binding issues.
apc.report_autofilter=0
; RFC1867 File Upload Progress hook handler
apc.rfc1867=0
apc.rfc1867_prefix =upload_
apc.rfc1867_name=APC_UPLOAD_PROGRESS
apc.rfc1867_freq=0
apc.rfc1867_ttl=3600
; Optimize include_once and require_once calls and avoid the expensive system calls used.
apc.include_once_override=0
apc.lazy_classes=0
apc.lazy_functions=0
; Enables APC handling of signals, such as SIGSEGV, that write core files when signaled.
; APC will attempt to unmap the shared memory segment in order to exclude it from the core file
apc.coredump_unmap=0
; Records a md5 hash of files.
apc.file_md5=0
; not documented
apc.preload_path
The apc.so is correctly located within /usr/lib64/php/modules/apc.so and is 755 owned by root.
]# ls -Z /usr/lib64/php/modules
-rwxr-xr-x root root ? apc.so
I have thought about un-installing and reinstalling as per this tutorial below but understand from reading various other websites this can cause issue with upgrades?

Upgrading PHP and installing APC on CentOS 5 with Plesk

Any thoughts or advice welcome, off to read the threads on this forum relating to the same issue in hope of some much needed inspiration. :wink:
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: PHP 5.3.9 Unable to load dynamic library /apc.so?

Unread post by breun »

The Atomic repository provides a php-pecl-apc package. That's not what you installed?
Lemonbit Internet Dedicated Server Management
Post Reply