Script de statistiques WinCache

Le package d'installation pour WinCache inclut un script PHP, wincache.php, qui peut être utilisé pour obtenir des informations et des statistiques sur le cache.

Si l'extension WinCache a été installée via l'installeur de Microsoft Web Platform, alors ce script se trouve dans %SystemDrive%\Program Files\IIS\Windows Cache for PHP\. Sur une version 64 bits du système d'exploitation Windows Server, le script se trouve dans %SystemDrive%\Program Files (x86)\IIS\Windows Cache for PHP. Si l'extension a été installée manuellement, alors le fichier wincache.php sera situé dans le même dossier à partir duquel le contenu du package d'installation a été extrait.

Pour utiliser wincache.php, copiez-le dans le dossier racine d'un site Web ou dans n'importe quel sous-dossier. Pour protéger le script, ouvrez-le dans n'importe quel éditeur et remplacez les valeurs des constantes USERNAME et PASSWORD. Si n'importe quel autre authentification IIS est activée sur le serveur, alors suivez les instructions dans les commentaires :

Exemple #1 Configuration de l'authentification pour wincache.php

<?php
/**
* ======================== CONFIGURATION SETTINGS ==============================
* If you do not want to use authentication for this page, set USE_AUTHENTICATION to 0.
* If you use authentication then replace the default password.
*/
define('USE_AUTHENTICATION', 1);
define('USERNAME', 'wincache');
define('PASSWORD', 'wincache');

/**
* The Basic PHP authentication will work only when IIS is configured to support
* Anonymous Authentication' and nothing else. If IIS is configured to support/use
* any other kind of authentication like Basic/Negotiate/Digest etc, this will not work.
* In that case use the array below to define the names of users in your
* domain/network/workgroup which you want to grant access to.
*/
$user_allowed = array('DOMAIN\user1', 'DOMAIN\user2', 'DOMAIN\user3');

/**
* If the array contains string 'all', then all the users authenticated by IIS
* will have access to the page. Uncomment the below line and comment above line
* to grant access to all users who gets authenticated by IIS.
*/
/* $user_allowed = array('all'); */

/** ===================== END OF CONFIGURATION SETTINGS ========================== */
?>

Note: Protégez toujours le script wincache.php en utilisant soit le mécanisme d'authentification intégré ou le mécanisme d'authentification du serveur. Laissez ce script non protégé peut compromettre la sécurité de votre application web et du serveur.

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top