• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

include/inc.check_pear.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003         +-----------------------------------------------------------------------------+
00004         | ILIAS open source                                                           |
00005         +-----------------------------------------------------------------------------+
00006         | Copyright (c) 1998-2001 ILIAS open source, University of Cologne            |
00007         |                                                                             |
00008         | This program is free software; you can redistribute it and/or               |
00009         | modify it under the terms of the GNU General Public License                 |
00010         | as published by the Free Software Foundation; either version 2              |
00011         | of the License, or (at your option) any later version.                      |
00012         |                                                                             |
00013         | This program is distributed in the hope that it will be useful,             |
00014         | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
00015         | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
00016         | GNU General Public License for more details.                                |
00017         |                                                                             |
00018         | You should have received a copy of the GNU General Public License           |
00019         | along with this program; if not, write to the Free Software                 |
00020         | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
00021         +-----------------------------------------------------------------------------+
00022 */
00023 
00024 
00033 include_once("PEAR.php");
00034 include_once("Auth/Auth.php");
00035 
00036 // wrapper for php 4.3.2 & higher
00037 @include_once "HTML/ITX.php";
00038 $tpl_class_name = "IntegratedTemplate";
00039 
00040 if (!class_exists("IntegratedTemplateExtension"))
00041 {
00042         include_once "HTML/Template/ITX.php";
00043         $tpl_class_name = "HTML_Template_ITX";
00044 }
00045 
00046 $include_paths = ini_get("include_path");
00047 
00048 // unix & windows use different characters to separate paths
00049 $separator = ";";
00050 
00051 if (!strstr(php_uname(), "Windows"))
00052 {
00053         $separator = ":";
00054 }
00055 
00056 $include_paths = explode($separator,$include_paths);
00057 
00058 $pear = class_exists("PEAR");
00059 $auth = class_exists("Auth");
00060 
00061 /*
00062 $pear = false
00063 $auth = false;
00064 
00065 foreach ($include_paths as $path)
00066 {
00067         if (file_exists(realpath($path)."/PEAR.php"))
00068         {
00069                 $pear = true;
00070         }
00071         
00072         if (file_exists(realpath($path)."/Auth/Auth.php"))
00073         {
00074                 $auth = true;
00075         }
00076 }
00077 */
00078 
00079 
00080 if (!$pear)
00081 {
00082         $msg = "<p><b>Error: Couldn't find PEAR API in your include path or in the current directory!</b><br/>".
00083                    "ILIAS 3 requires several modules from PEAR to run. ".
00084                    "Please read the manual how to install PEAR first before using ILIAS 3.</p>".
00085                    "<p>More information and a documetation about the PEAR API can be found at ".
00086                    "<a href=\"http://pear.php.net\" target=\"_blank\">http://pear.php.net</a></p>";     
00087         echo $msg;
00088         exit();
00089 }
00090 
00091 if (!$auth)
00092 {
00093         $msg = "<p><b>Error: Couldn't find module Auth in your PEAR API!</b><br/>".
00094                    "ILIAS 3 requires this module for authentification. ".
00095                    "Please read the manual how to install the auth module before using ILIAS 3.</p>".
00096                    "<p>More information and a documetation about the PEAR API can be found at ".
00097                    "<a href=\"http://pear.php.net\" target=\"_blank\">http://pear.php.net</a></p>";     
00098         echo $msg;
00099         exit();
00100 }
00101 ?>

Generated on Fri Dec 13 2013 13:52:11 for ILIAS Release_3_7_x_branch .rev 46817 by  doxygen 1.7.1