APC does not work with php 5.3 upgraded

thunn

Verified User
Joined
Mar 13, 2012
Messages
166
Dear Supporter,
My old PHP version (php 5.2) work good with PHP APC 3.1.9

I've just upgrade successfully to PHP 5.3 and it works good. But I check APC and see that this extension does not work. I have tried to install APC 3.1.9 again, it does not work. I tried a nother chance by using APC 3.1.11 and still get the same result.

Code:
FAILED TEST SUMMARY
---------------------------------------------------------------------
APC: classes with namespaces (php 5.3) [tests/apc53_001.phpt]
APC: global spaces (php 5.3) [tests/apc53_002.phpt]
APC: anonymous functions (php 5.3) [tests/apc53_003.phpt]
APC: closures (php 5.3) [tests/apc53_004.phpt]
APC: goto (php 5.3) [tests/apc53_005.phpt]
APC: apc_store/fetch with strings [tests/apc_001.phpt]
APC: apc_store/fetch with objects [tests/apc_002.phpt]
APC: apc_store/fetch with objects (php 5.3) [tests/apc_003b.phpt]
APC: apc_store/fetch with bools [tests/apc_004.phpt]
APC: apc_store/fetch with arrays of objects [tests/apc_005.phpt]
APC: apc_store/fetch reference test [tests/apc_006.phpt]
APC: apc_inc/apc_dec test [tests/apc_007.phpt]
APC: apc_cas test [tests/apc_008.phpt]
APC: apc_delete_file test [tests/apc_009.phpt]
APC: apc_store/fetch/add with array of key/value pairs. [tests/apc_010.phpt]
APC: bindump user cache [tests/apc_bin_001.phpt]
APC: bindump file cache part 1 [tests/apc_bin_002.phpt]
APC: APCIterator general [tests/iterator_001.phpt]
APC: APCIterator regex [tests/iterator_002.phpt]
APC: APCIterator chunk size [tests/iterator_003.phpt]
APC: APCIterator regex & chunk size & list [tests/iterator_004.phpt]
APC: APCIterator delete [tests/iterator_005.phpt]
APC: APCIterator formats [tests/iterator_006.phpt]
APC: APCIterator Overwriting the ctor [tests/iterator_007.phpt]

The FULL tested file of APC 3.1.11 is attached. Pls check if you can see some problem there.

Thank you.
 

Attachments

Last edited:
Hello,

is that the results of running

Code:
./make test

while re-building APC? Did you try to skip it and test APC and see results of apc.php script in your browser?
 
Hello,

is that the results of running

Code:
./make test
=> Yes it is.


while re-building APC? Did you try to skip it and test APC and see results of apc.php script in your browser?
=> I have tried to run APC from apc.php and it says this:
"No cache info available. APC does not appear to be running."

In a Joomla site, no "APC" cache method available too.

Thanks.
 
Yes, I got this info:
Code:
[root@ns mysql]# php --ini
PHP Warning:  PHP Startup: apc: Unable to initialize module
[B]Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match[/B]
 in Unknown on line 0
Configuration File (php.ini) Path: /usr/local/lib
Loaded Configuration File:         /usr/local/lib/php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)

Code:
[root@ns mysql]# php -v
PHP Warning:  PHP Startup: apc: Unable to initialize module
[B]Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match[/B]
 in Unknown on line 0
PHP 5.3.15 (cli) (built: Aug 11 2012 02:12:23) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

Looks like I need to download newest version then re-complile it. Is that right?
 
And what about extension dir (see /usr/local/lib/php.ini)? Did you copy new apc.so to the extensions directory?
 
And what about extension dir (see /usr/local/lib/php.ini)? Did you copy new apc.so to the extensions directory?

In php.ini it looks like this:
Code:
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613/

I guess that the file is automatically copy to that folder right?
 
Yes, it's seems so. And do you have a newly compiled apc.so there in the directory?

Code:
ls -la /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
 
Yes, it's seems so. And do you have a newly compiled apc.so there in the directory?

Code:
ls -la /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
Looks like it's the old file :(
Code:
-rwxr-xr-x 1 root root 564230 Jun 10 09:03 apc.so
 
And what are the last 10-20 lines on the screen when you run

Code:
make install

for APC?

I run and get this:

Code:
[root@ns APC-3.1.9]# make install
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20090626/
Installing header files:          /usr/local/include/php/

And I need to change from old path
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613/"
to this new path:
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20090626/"

And wow, its working.
zEitEr, thank you very much!
 
Back
Top