<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>WinCache Statistics Script</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="wincache.configuration.html">Runtime Configuration</a></div> <div class="next" style="text-align: right; float: right;"><a href="wincache.sessionhandler.html">WinCache Session Handler</a></div> <div class="up"><a href="wincache.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="wincache.stats" class="section"> <h2 class="title">WinCache Statistics Script</h2> <p class="para"> The installation package for WinCache includes a PHP script, <var class="filename">wincache.php</var>, that can be used to obtain cache information and statistics. </p> <p class="para"> If the WinCache extension was installed via the Microsoft Web Platform Installer, then this script is located in <var class="filename">%SystemDrive%\Program Files\IIS\Windows Cache for PHP\</var>. On a 64-bit version of the Windows Server operating system, the script is located in <var class="filename">%SystemDrive%\Program Files (x86)\IIS\Windows Cache for PHP</var>. If the extension was installed manually, then the <var class="filename">wincache.php</var> will be located in the same folder from which the content of the installation package was extracted. </p> <p class="para"> To use <var class="filename">wincache.php</var>, copy it into a root folder of a Web site or into any subfolder. To protect the script, open it in any text editor and replace the values for <em class="emphasis">USERNAME</em> and <em class="emphasis">PASSWORD</em> constants. If any other IIS authentication is enabled on the server, then follow the instructions in the comments: <div class="example" id="example-555"> <p><strong>Example #1 Authentication configuration for <var class="filename">wincache.php</var></strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br /></span><span style="color: #FF8000">/**<br /> * ======================== CONFIGURATION SETTINGS ==============================<br /> * If you do not want to use authentication for this page, set USE_AUTHENTICATION to 0.<br /> * If you use authentication then replace the default password.<br /> */<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'USE_AUTHENTICATION'</span><span style="color: #007700">, </span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'USERNAME'</span><span style="color: #007700">, </span><span style="color: #DD0000">'wincache'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'PASSWORD'</span><span style="color: #007700">, </span><span style="color: #DD0000">'wincache'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/**<br /> * The Basic PHP authentication will work only when IIS is configured to support <br /> * Anonymous Authentication' and nothing else. If IIS is configured to support/use<br /> * any other kind of authentication like Basic/Negotiate/Digest etc, this will not work.<br /> * In that case use the array below to define the names of users in your <br /> * domain/network/workgroup which you want to grant access to.<br /> */<br /></span><span style="color: #0000BB">$user_allowed </span><span style="color: #007700">= array(</span><span style="color: #DD0000">'DOMAIN\user1'</span><span style="color: #007700">, </span><span style="color: #DD0000">'DOMAIN\user2'</span><span style="color: #007700">, </span><span style="color: #DD0000">'DOMAIN\user3'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/**<br /> * If the array contains string 'all', then all the users authenticated by IIS<br /> * will have access to the page. Uncomment the below line and comment above line<br /> * to grant access to all users who gets authenticated by IIS.<br /> */<br />/* $user_allowed = array('all'); */<br /><br />/** ===================== END OF CONFIGURATION SETTINGS ========================== */<br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> </div> <blockquote class="note"><p><strong class="note">Note</strong>: <span class="simpara"> Always protect the <var class="filename">wincache.php</var> script by using either the built-in authentication or the server's authentication mechanism. Leaving this script unprotected may compromise the security of your web application and web server. </span> </p></blockquote> </p> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="wincache.configuration.html">Runtime Configuration</a></div> <div class="next" style="text-align: right; float: right;"><a href="wincache.sessionhandler.html">WinCache Session Handler</a></div> <div class="up"><a href="wincache.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>