[ Index ]
 

Code source de Phorum 5.1.25

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/include/admin/sanity_checks/ -> php_safety.php (source)

   1  <?php
   2  
   3  ////////////////////////////////////////////////////////////////////////////////
   4  //                                                                            //
   5  //   Copyright (C) 2006  Phorum Development Team                              //
   6  //   http://www.phorum.org                                                    //
   7  //                                                                            //
   8  //   This program is free software. You can redistribute it and/or modify     //
   9  //   it under the terms of either the current Phorum License (viewable at     //
  10  //   phorum.org) or the Phorum License that was distributed with this file    //
  11  //                                                                            //
  12  //   This program is distributed in the hope that it will be useful,          //
  13  //   but WITHOUT ANY WARRANTY, without even the implied warranty of           //
  14  //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                     //
  15  //                                                                            //
  16  //   You should have received a copy of the Phorum License                    //
  17  //   along with this program.                                                 //
  18  ////////////////////////////////////////////////////////////////////////////////
  19  
  20      // Check if the cache directory is available and if
  21      // files and directories can be created in it. Also
  22      // do a basic check on Phorums caching API.
  23  
  24      $phorum_check = "PHP safety issues";
  25  
  26      function phorum_check_php_safety(){
  27  
  28          // Check if register_globals is on.
  29          if (ini_get('register_globals')) return array(
  30              PHORUM_SANITY_WARN,
  31              "The PHP configuration setting \"register_globals\" is set
  32               to \"On\". It is generally recommended to disable this
  33               setting, because it can introduce security problems for
  34               scripts that are not carefully written. See also
  35               http://www.php.net/register_globals for more info on this
  36               subject.<br/><br/>
  37               Although the Phorum development team always tries to write code
  38               which cannot be affected by this setting in any way, we can never 
  39               guarantee that it will be 100% safe.",
  40              "Disable \"register_globals\" in the PHP configuration file
  41               \"php.ini\" on your webserver. If you are hosting with a 
  42               company, please contact them to do this for you."
  43          );
  44  
  45          return array (PHORUM_SANITY_OK, NULL);
  46      }
  47  ?>


Généré le : Thu Nov 29 12:22:27 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics