Page 1 of 1

Unable to load dynamic library 'apc.so'

Posted: 2019/08/08 17:29:30
by tenchoe
Hello there,

I was helping a friend to upgrade the php version from 5 to 7.

It went successful.

However, when i type php --version

I am getting this error message.
PHP Warning: PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib64/php/modules/apc.so (/usr/lib64/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/apc.so.so (/usr/lib64/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) in Unknownon line 0PHP 7.2.21 (cli) (built: Jul 30 2019 15:00:44) ( NTS )

I thought whether after httpd service restart the problem will disappear but I got this error
Starting httpd: httpd: Syntax error on line 17 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/php.conf: Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot open shared object file: No such file or directory

I am a noob and had googled and searched forums... but was not able to find a viable solution. Few links of manually create apc.so was there but I can't make the file (using make command). I am afraid whether I am heading to right direction..

your help is highly appreciateed!

Regards,
Tenchoe

Re: Unable to load dynamic library 'apc.so'

Posted: 2019/08/08 17:43:32
by TrevorH
How exactly did you "upgrade the php version from 5 to 7"? If it involved any of tar, make, gcc then you did it wrong.

You can find php 7.x packages in various repos including IUS and SCL. IUS is designed to entirely replace the distro php 5.3.3 and SCL is designed to install the newer version in parallel so you can run either/both at the same time. No-one supplies php 7.2 for CentOS 6 which is the forum you are posting in - are you running CentOS 6 or 7?

Re: Unable to load dynamic library 'apc.so'

Posted: 2019/08/09 07:30:27
by Whoever
tenchoe wrote:
2019/08/08 17:29:30
Hello there,

I was helping a friend to upgrade the php version from 5 to 7.

It went successful.

However, when i type php --version

I am getting this error message.
PHP Warning: PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib64/php/modules/apc.so (/usr/lib64/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/apc.so.so (/usr/lib64/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) in Unknownon line 0PHP 7.2.21 (cli) (built: Jul 30 2019 15:00:44) ( NTS )
That's obviously some use of the word "successful" that I haven't come across before.

Re: Unable to load dynamic library 'apc.so'

Posted: 2019/10/10 11:53:35
by daberelay
did you manage to solve this? I'm having the same issue here with CentOS 7 and php 7.3