Hello,
I was just reading through some tutorials on caching and found apc_store function of php-pecl-apc package and decided to give it a shot. It installed just fine and phpinfo() showed it running with no errors in httpd/error_log.
When I test it with the example from php.net:
Code: Select all
$bar = 'BAR';
apc_store('foo', $bar);
var_dump(apc_fetch('foo'));
Code: Select all
[Wed Jan 12 21:48:40 2011] [notice] Apache/2.2.15 (Unix) DAV/2 mod_ssl/2.2.15 OpenSSL/0.9.8e-fips-rhel5 Apache mod_jk/1.2.15 mod_perl/2.0.4 Perl/v5.8.8 configured -- resuming normal operations
[Wed Jan 12 21:48:46 2011] [notice] child pid 15867 exit signal Segmentation fault (11)
.. Clipping 17 more of these lines ..
[Wed Jan 12 21:49:28 2011] [notice] child pid 15963 exit signal Segmentation fault (11)
[Wed Jan 12 21:49:28 2011] [notice] caught SIGTERM, shutting down
If trying to reproduce this make sure to follow this advice after installing php-pecl-apc package:
APC now requires memory cache sizes to be specified with an M or G or it may cause segmentation faults and will leave you an error in your log files warning you of this.
Change in /etc/php.d/apc.ini
Code: Select all
apc.shm_size=32
Code: Select all
apc.shm_size=32M