Forum Moderators: coopster
FreeBSD 5.4, ports up to date.
I've installed pecl-APC [pecl.php.net ], to use apc_store and apc_fetch. phpinfo(); shows:
APC Support enabled
Version 2.0.3
MMAP Support Enabled
MMAP File Mask no value
Revision $Revision: 3.27 $
Build Date May 24 2005 16:16:22
DirectiveLocal ValueMaster Value
apc.enabled11
apc.filtersno valueno value
apc.gc_ttl36003600
apc.mmap_file_maskno valueno value
apc.num_files_hint10001000
apc.optimization00
apc.shm_segments11
apc.shm_size3030
Even everything seems to have installed and been enabled, I still can't use the apc_store() function with this code (taken from Rasmus' demo):
<?php
$a = array(1,2,3);
apc_store('my_array', $a, 5);
$a = 0;
echo "<pre>"; var_dump($a); echo "</pre>";
$b = apc_fetch('my_array');
echo "<pre>"; var_dump($b); echo "</pre>";
?>
returns with:
Fatal error: Call to undefined function: apc_store() in /usr/local/www/data-dist/shmop/apc.php on line 3
So I'm wondering if anyone has had any luck in setting this up and using it. I can't find documentation anywhere, and it's not part of the standard php core, so there's no references to it in php.net
Any hints would much appreciated!
MM
good point, not sure really we are looking at ways of using shared memory to store various things
we are loading some things to be available through $_SERVER and then we have a ton of constants we want to load and this was a way we had seen to do it, we also are just playing around to a certain extent.
We don't know if this is the answer yet but we have a few dev servers so if we mess one up, who really cares. ;)
Matt