note 89211 added to apc.configuration
| From: | bishop at osu1 dot php dot net | Date: | Thu, 26 Feb 2009 15:22:33 +0000 |
| Subject: | note 89211 added to apc.configuration | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-151172@lists.php.net to get a copy of this message | ||
The apc.rfc1867 example code above is a little fast and loose for those running in environments
where APC RFC1867 may or may not be available. This is a little more expressive:
<?php
// if we have PHP and APC
$havePHP = (1 === version_compare(PHP_VERSION, '5.2.0') ? true : false);
$haveAPC = (extension_loaded('apc') && 1 ===
version_compare(phpversion('apc'), '3.0.13') ? true : false);
if ($havePHP && $haveAPC) {
// if APC and upload tracking is enabled
if (ini_get('apc.enabled') && ini_get('apc.rfc1867')) {
// get the stats
$key = ini_get('apc.rfc1867_prefix') . $_REQUEST['apcid'];
$stats = apc_fetch($key);
}
}
?>
----
Server IP: 209.41.74.194
Probable Submitter: 24.148.150.180
----
Manual Page -- http://www.php.net/manual/en/apc.configuration.php
Edit -- https://master.php.net/note/edit/89211
Del: integrated -- https://master.php.net/note/delete/89211/integrated
Del: useless -- https://master.php.net/note/delete/89211/useless
Del: bad code -- https://master.php.net/note/delete/89211/bad+code
Del: spam -- https://master.php.net/note/delete/89211/spam
Del: non-english -- https://master.php.net/note/delete/89211/non-english
Del: in docs -- https://master.php.net/note/delete/89211/in+docs
Del: other reasons-- https://master.php.net/note/delete/89211
Reject -- https://master.php.net/note/reject/89211
Search -- https://master.php.net/manage/user-notes.php