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

cms/config.inc.php

Go to the documentation of this file.
00001 <?php
00009 /*******MYSQL SETTINGS************************/
00010 // defining the ip address of the mysql server.
00011 define("MYSQL_SERVER","localhost");
00012 
00013 // defining the username to connect to the database.
00014 define("MYSQL_USERNAME","pragyancms");
00015 
00016 // defining the password used to connect to the database.
00017 define("MYSQL_PASSWORD","pragyancms");
00018 
00019 // defining the name of the database to connect to.
00020 define("MYSQL_DATABASE","pragyancms");
00021 
00022 // defining the prefix which is appended to every table of Pragyan CMS.
00023 // this feature allows you to have multiple websites using the same database.
00024 define("MYSQL_DATABASE_PREFIX","pragyanV3_");
00025 
00026 // defining the user id of the administrator. WARNING: Only experts should alter this.
00027 define("ADMIN_USERID",1);
00028 
00029 /*******CONFIGURATION SETTINGS************************/
00039 $error_level = 0;
00040 switch($error_level) {
00041         case 0 : $error_text = 0; break;
00042         case 1 : $error_text = E_ERROR | E_WARNING | E_PARSE; break;
00043         case 2 : $error_text = E_ERROR | E_WARNING | E_PARSE | E_NOTICE; break;
00044         case 3 : $error_text = E_ALL ^ E_NOTICE;break;
00045         case 4 : $error_text = E_ALL; break;
00046         case 5 : $error_text = E_ALL; $debugSet='on'; break;
00047 }
00048 ini_set('error_reporting', $error_text);
00049 ini_set('display_errors', 0);
00050 
00051 //The language folder to be imported
00052 define("LANGUAGE","en");
00053 
00054 /*****MAIL MESSAGES SETTINGS************************************/
00055 
00056 define("MAILPATH","./cms/languages");
00057 
00058 // By default .cms/languages/en must exist
00059 
00060 /*****AUTHENTICATION SETTINGS**************************/
00061 
00062 //IMAP settings
00063 $authmethods['imap']['status']=false;
00064 $authmethods['imap']['server_address']="";
00065 $authmethods['imap']['port']="";
00066 $authmethods['imap']['user_domain']=""; // i.e. user must login with username@nitt.edu
00067 //LDAP settings
00068 $authmethods['ldap']['status']=false;
00069 $authmethods['ldap']['server_address']="";
00070 $authmethods['ldap']['search_group']="";
00071 $authmethods['ldap']['user_domain']="";
00072 //ADS settings
00073 $authmethods['ads']['status']=false;
00074 $authmethods['ads']['server_address']="";
00075 $authmethods['ads']['network_name']="";
00076 $authmethods['ads']['user_domain']="";
00077 
00078 /*****SESSION SETTINGS*********************************/
00079 if(!defined('CMS_SETUP')) {
00080  // we deal with cookies here because the session id variable is stored in a client cookie
00081  ini_set("use_cookies",1);
00082  ini_set("use_only_cookies",1);
00083 
00084 // path for session cookies
00085 $cookie_path = "/";
00086 
00087 // timeout value for the cookie
00088 $cookie_timeout = 60 * 30; // in seconds//60 * 30
00089 
00090 // timeout value for the garbage collector
00091 //   we add 300 seconds, just in case the user's computer clock
00092 //   was synchronized meanwhile; 300 secs (5 minutes) should be
00093 //   enough - just to ensure there is session data until the
00094 //   cookie expires
00095 $garbage_timeout = $cookie_timeout + 300; // in seconds //300
00096 
00097 // set the PHP session id (PHPSESSID) cookie to a custom value
00098 ini_set('session.name',"PHPSESSID");
00099 session_set_cookie_params($cookie_timeout, $cookie_path);
00100 
00101 // set the garbage collector - who will clean the session files -
00102 //   to our custom timeout
00103 ini_set('session.gc_maxlifetime', $garbage_timeout);
00104 /*ini_set('session.gc_probability',1); //defaults to 1
00105  *ini_set('session.gc_divisor',2); //defaults to 100
00106  * gc_probability / gc_divisor gives probability of the garbage collector
00107  * being started
00108  */
00109 // we need a distinct directory for the session files,
00110 //   otherwise another garbage collector with a lower gc_maxlifetime
00111 //   will clean our files aswell - but in our own directory, we only
00112 //   clean sessions with our "own" garbage collector (which has a
00113 //   custom timeout/maxlifetime set each time one of our scripts is
00114 //   executed)
00115 $sessdir = $sourceFolder."/".$uploadFolder."/sessions";
00116 if (!is_dir($sessdir)) { mkdir($sessdir, 0777); }
00117 ini_set('session.save_path', $sessdir);
00118 
00119 }
00120 ?>

Generated on Sun Jan 2 2011 04:55:31 for Pragyan CMS by  doxygen 1.7.1