PageRenderTime 71ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/oscommerce-2.2rc2/includes/application_top.php

http://myopensources.googlecode.com/
PHP | 516 lines | 373 code | 73 blank | 70 comment | 151 complexity | 4a4ac43489f5acb2664131ea3f32b3e3 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1
  1. <?php
  2. /*
  3. $Id: application_top.php 1785 2008-01-10 15:07:07Z hpdl $
  4. osCommerce, Open Source E-Commerce Solutions
  5. http://www.oscommerce.com
  6. Copyright (c) 2008 osCommerce
  7. Released under the GNU General Public License
  8. */
  9. // start the timer for the page parse time log
  10. define('PAGE_PARSE_START_TIME', microtime());
  11. // set the level of error reporting
  12. error_reporting(E_ALL & ~E_NOTICE);
  13. // check support for register_globals
  14. if (function_exists('ini_get') && (ini_get('register_globals') == false) && (PHP_VERSION < 4.3) ) {
  15. exit('Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory. Please use PHP 4.3+ if register_globals cannot be enabled on the server.');
  16. }
  17. // Set the local configuration parameters - mainly for developers
  18. if (file_exists('includes/local/configure.php')) include('includes/local/configure.php');
  19. // include server parameters
  20. require('includes/configure.php');
  21. if (strlen(DB_SERVER) < 1) {
  22. if (is_dir('install')) {
  23. header('Location: install/index.php');
  24. }
  25. }
  26. // define the project version
  27. define('PROJECT_VERSION', 'osCommerce Online Merchant v2.2 RC2');
  28. // some code to solve compatibility issues
  29. require(DIR_WS_FUNCTIONS . 'compatibility.php');
  30. // set the type of request (secure or not)
  31. $request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';
  32. // set php_self in the local scope
  33. if (!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];
  34. if ($request_type == 'NONSSL') {
  35. define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG);
  36. } else {
  37. define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);
  38. }
  39. // include the list of project filenames
  40. require(DIR_WS_INCLUDES . 'filenames.php');
  41. // include the list of project database tables
  42. require(DIR_WS_INCLUDES . 'database_tables.php');
  43. // customization for the design layout
  44. define('BOX_WIDTH', 125); // how wide the boxes should be in pixels (default: 125)
  45. // include the database functions
  46. require(DIR_WS_FUNCTIONS . 'database.php');
  47. // make a connection to the database... now
  48. tep_db_connect() or die('Unable to connect to database server!');
  49. // set the application parameters
  50. $configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION);
  51. while ($configuration = tep_db_fetch_array($configuration_query)) {
  52. define($configuration['cfgKey'], $configuration['cfgValue']);
  53. }
  54. // if gzip_compression is enabled, start to buffer the output
  55. if ( (GZIP_COMPRESSION == 'true') && ($ext_zlib_loaded = extension_loaded('zlib')) && (PHP_VERSION >= '4') ) {
  56. if (($ini_zlib_output_compression = (int)ini_get('zlib.output_compression')) < 1) {
  57. if (PHP_VERSION >= '4.0.4') {
  58. ob_start('ob_gzhandler');
  59. } else {
  60. include(DIR_WS_FUNCTIONS . 'gzip_compression.php');
  61. ob_start();
  62. ob_implicit_flush();
  63. }
  64. } else {
  65. ini_set('zlib.output_compression_level', GZIP_LEVEL);
  66. }
  67. }
  68. // set the HTTP GET parameters manually if search_engine_friendly_urls is enabled
  69. if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
  70. if (strlen(getenv('PATH_INFO')) > 1) {
  71. $GET_array = array();
  72. $PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF);
  73. $vars = explode('/', substr(getenv('PATH_INFO'), 1));
  74. for ($i=0, $n=sizeof($vars); $i<$n; $i++) {
  75. if (strpos($vars[$i], '[]')) {
  76. $GET_array[substr($vars[$i], 0, -2)][] = $vars[$i+1];
  77. } else {
  78. $HTTP_GET_VARS[$vars[$i]] = $vars[$i+1];
  79. }
  80. $i++;
  81. }
  82. if (sizeof($GET_array) > 0) {
  83. while (list($key, $value) = each($GET_array)) {
  84. $HTTP_GET_VARS[$key] = $value;
  85. }
  86. }
  87. }
  88. }
  89. // define general functions used application-wide
  90. require(DIR_WS_FUNCTIONS . 'general.php');
  91. require(DIR_WS_FUNCTIONS . 'html_output.php');
  92. // set the cookie domain
  93. $cookie_domain = (($request_type == 'NONSSL') ? HTTP_COOKIE_DOMAIN : HTTPS_COOKIE_DOMAIN);
  94. $cookie_path = (($request_type == 'NONSSL') ? HTTP_COOKIE_PATH : HTTPS_COOKIE_PATH);
  95. // include cache functions if enabled
  96. if (USE_CACHE == 'true') include(DIR_WS_FUNCTIONS . 'cache.php');
  97. // include shopping cart class
  98. require(DIR_WS_CLASSES . 'shopping_cart.php');
  99. // include navigation history class
  100. require(DIR_WS_CLASSES . 'navigation_history.php');
  101. // check if sessions are supported, otherwise use the php3 compatible session class
  102. if (!function_exists('session_start')) {
  103. define('PHP_SESSION_NAME', 'osCsid');
  104. define('PHP_SESSION_PATH', $cookie_path);
  105. define('PHP_SESSION_DOMAIN', $cookie_domain);
  106. define('PHP_SESSION_SAVE_PATH', SESSION_WRITE_DIRECTORY);
  107. include(DIR_WS_CLASSES . 'sessions.php');
  108. }
  109. // define how the session functions will be used
  110. require(DIR_WS_FUNCTIONS . 'sessions.php');
  111. // set the session name and save path
  112. tep_session_name('osCsid');
  113. tep_session_save_path(SESSION_WRITE_DIRECTORY);
  114. // set the session cookie parameters
  115. if (function_exists('session_set_cookie_params')) {
  116. session_set_cookie_params(0, $cookie_path, $cookie_domain);
  117. } elseif (function_exists('ini_set')) {
  118. ini_set('session.cookie_lifetime', '0');
  119. ini_set('session.cookie_path', $cookie_path);
  120. ini_set('session.cookie_domain', $cookie_domain);
  121. }
  122. // set the session ID if it exists
  123. if (isset($HTTP_POST_VARS[tep_session_name()])) {
  124. tep_session_id($HTTP_POST_VARS[tep_session_name()]);
  125. } elseif ( ($request_type == 'SSL') && isset($HTTP_GET_VARS[tep_session_name()]) ) {
  126. tep_session_id($HTTP_GET_VARS[tep_session_name()]);
  127. }
  128. // start the session
  129. $session_started = false;
  130. if (SESSION_FORCE_COOKIE_USE == 'True') {
  131. tep_setcookie('cookie_test', 'please_accept_for_session', time()+60*60*24*30, $cookie_path, $cookie_domain);
  132. if (isset($HTTP_COOKIE_VARS['cookie_test'])) {
  133. tep_session_start();
  134. $session_started = true;
  135. }
  136. } elseif (SESSION_BLOCK_SPIDERS == 'True') {
  137. $user_agent = strtolower(getenv('HTTP_USER_AGENT'));
  138. $spider_flag = false;
  139. if (tep_not_null($user_agent)) {
  140. $spiders = file(DIR_WS_INCLUDES . 'spiders.txt');
  141. for ($i=0, $n=sizeof($spiders); $i<$n; $i++) {
  142. if (tep_not_null($spiders[$i])) {
  143. if (is_integer(strpos($user_agent, trim($spiders[$i])))) {
  144. $spider_flag = true;
  145. break;
  146. }
  147. }
  148. }
  149. }
  150. if ($spider_flag == false) {
  151. tep_session_start();
  152. $session_started = true;
  153. }
  154. } else {
  155. tep_session_start();
  156. $session_started = true;
  157. }
  158. if ( ($session_started == true) && (PHP_VERSION >= 4.3) && function_exists('ini_get') && (ini_get('register_globals') == false) ) {
  159. extract($_SESSION, EXTR_OVERWRITE+EXTR_REFS);
  160. }
  161. // set SID once, even if empty
  162. $SID = (defined('SID') ? SID : '');
  163. // verify the ssl_session_id if the feature is enabled
  164. if ( ($request_type == 'SSL') && (SESSION_CHECK_SSL_SESSION_ID == 'True') && (ENABLE_SSL == true) && ($session_started == true) ) {
  165. $ssl_session_id = getenv('SSL_SESSION_ID');
  166. if (!tep_session_is_registered('SSL_SESSION_ID')) {
  167. $SESSION_SSL_ID = $ssl_session_id;
  168. tep_session_register('SESSION_SSL_ID');
  169. }
  170. if ($SESSION_SSL_ID != $ssl_session_id) {
  171. tep_session_destroy();
  172. tep_redirect(tep_href_link(FILENAME_SSL_CHECK));
  173. }
  174. }
  175. // verify the browser user agent if the feature is enabled
  176. if (SESSION_CHECK_USER_AGENT == 'True') {
  177. $http_user_agent = getenv('HTTP_USER_AGENT');
  178. if (!tep_session_is_registered('SESSION_USER_AGENT')) {
  179. $SESSION_USER_AGENT = $http_user_agent;
  180. tep_session_register('SESSION_USER_AGENT');
  181. }
  182. if ($SESSION_USER_AGENT != $http_user_agent) {
  183. tep_session_destroy();
  184. tep_redirect(tep_href_link(FILENAME_LOGIN));
  185. }
  186. }
  187. // verify the IP address if the feature is enabled
  188. if (SESSION_CHECK_IP_ADDRESS == 'True') {
  189. $ip_address = tep_get_ip_address();
  190. if (!tep_session_is_registered('SESSION_IP_ADDRESS')) {
  191. $SESSION_IP_ADDRESS = $ip_address;
  192. tep_session_register('SESSION_IP_ADDRESS');
  193. }
  194. if ($SESSION_IP_ADDRESS != $ip_address) {
  195. tep_session_destroy();
  196. tep_redirect(tep_href_link(FILENAME_LOGIN));
  197. }
  198. }
  199. // create the shopping cart & fix the cart if necesary
  200. if (tep_session_is_registered('cart') && is_object($cart)) {
  201. if (PHP_VERSION < 4) {
  202. $broken_cart = $cart;
  203. $cart = new shoppingCart;
  204. $cart->unserialize($broken_cart);
  205. }
  206. } else {
  207. tep_session_register('cart');
  208. $cart = new shoppingCart;
  209. }
  210. // include currencies class and create an instance
  211. require(DIR_WS_CLASSES . 'currencies.php');
  212. $currencies = new currencies();
  213. // include the mail classes
  214. require(DIR_WS_CLASSES . 'mime.php');
  215. require(DIR_WS_CLASSES . 'email.php');
  216. // set the language
  217. if (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) {
  218. if (!tep_session_is_registered('language')) {
  219. tep_session_register('language');
  220. tep_session_register('languages_id');
  221. }
  222. include(DIR_WS_CLASSES . 'language.php');
  223. $lng = new language();
  224. if (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) {
  225. $lng->set_language($HTTP_GET_VARS['language']);
  226. } else {
  227. $lng->get_browser_language();
  228. }
  229. $language = $lng->language['directory'];
  230. $languages_id = $lng->language['id'];
  231. }
  232. // include the language translations
  233. require(DIR_WS_LANGUAGES . $language . '.php');
  234. // currency
  235. if (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $currency) ) ) {
  236. if (!tep_session_is_registered('currency')) tep_session_register('currency');
  237. if (isset($HTTP_GET_VARS['currency']) && $currencies->is_set($HTTP_GET_VARS['currency'])) {
  238. $currency = $HTTP_GET_VARS['currency'];
  239. } else {
  240. $currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
  241. }
  242. }
  243. // navigation history
  244. if (tep_session_is_registered('navigation')) {
  245. if (PHP_VERSION < 4) {
  246. $broken_navigation = $navigation;
  247. $navigation = new navigationHistory;
  248. $navigation->unserialize($broken_navigation);
  249. }
  250. } else {
  251. tep_session_register('navigation');
  252. $navigation = new navigationHistory;
  253. }
  254. $navigation->add_current_page();
  255. // Shopping cart actions
  256. if (isset($HTTP_GET_VARS['action'])) {
  257. // redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled
  258. if ($session_started == false) {
  259. tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
  260. }
  261. if (DISPLAY_CART == 'true') {
  262. $goto = FILENAME_SHOPPING_CART;
  263. $parameters = array('action', 'cPath', 'products_id', 'pid');
  264. } else {
  265. $goto = basename($PHP_SELF);
  266. if ($HTTP_GET_VARS['action'] == 'buy_now') {
  267. $parameters = array('action', 'pid', 'products_id');
  268. } else {
  269. $parameters = array('action', 'pid');
  270. }
  271. }
  272. switch ($HTTP_GET_VARS['action']) {
  273. // customer wants to update the product quantity in their shopping cart
  274. case 'update_product' : for ($i=0, $n=sizeof($HTTP_POST_VARS['products_id']); $i<$n; $i++) {
  275. if (in_array($HTTP_POST_VARS['products_id'][$i], (is_array($HTTP_POST_VARS['cart_delete']) ? $HTTP_POST_VARS['cart_delete'] : array()))) {
  276. $cart->remove($HTTP_POST_VARS['products_id'][$i]);
  277. } else {
  278. if (PHP_VERSION < 4) {
  279. // if PHP3, make correction for lack of multidimensional array.
  280. reset($HTTP_POST_VARS);
  281. while (list($key, $value) = each($HTTP_POST_VARS)) {
  282. if (is_array($value)) {
  283. while (list($key2, $value2) = each($value)) {
  284. if (ereg ("(.*)\]\[(.*)", $key2, $var)) {
  285. $id2[$var[1]][$var[2]] = $value2;
  286. }
  287. }
  288. }
  289. }
  290. $attributes = ($id2[$HTTP_POST_VARS['products_id'][$i]]) ? $id2[$HTTP_POST_VARS['products_id'][$i]] : '';
  291. } else {
  292. $attributes = ($HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]]) ? $HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]] : '';
  293. }
  294. $cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false);
  295. }
  296. }
  297. tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
  298. break;
  299. // customer adds a product from the products page
  300. case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
  301. $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
  302. }
  303. tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
  304. break;
  305. // performed by the 'buy now' button in product listings and review page
  306. case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) {
  307. if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {
  308. tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));
  309. } else {
  310. $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);
  311. }
  312. }
  313. tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
  314. break;
  315. case 'notify' : if (tep_session_is_registered('customer_id')) {
  316. if (isset($HTTP_GET_VARS['products_id'])) {
  317. $notify = $HTTP_GET_VARS['products_id'];
  318. } elseif (isset($HTTP_GET_VARS['notify'])) {
  319. $notify = $HTTP_GET_VARS['notify'];
  320. } elseif (isset($HTTP_POST_VARS['notify'])) {
  321. $notify = $HTTP_POST_VARS['notify'];
  322. } else {
  323. tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));
  324. }
  325. if (!is_array($notify)) $notify = array($notify);
  326. for ($i=0, $n=sizeof($notify); $i<$n; $i++) {
  327. $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $notify[$i] . "' and customers_id = '" . $customer_id . "'");
  328. $check = tep_db_fetch_array($check_query);
  329. if ($check['count'] < 1) {
  330. tep_db_query("insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . $notify[$i] . "', '" . $customer_id . "', now())");
  331. }
  332. }
  333. tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));
  334. } else {
  335. $navigation->set_snapshot();
  336. tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
  337. }
  338. break;
  339. case 'notify_remove' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['products_id'])) {
  340. $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
  341. $check = tep_db_fetch_array($check_query);
  342. if ($check['count'] > 0) {
  343. tep_db_query("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
  344. }
  345. tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action'))));
  346. } else {
  347. $navigation->set_snapshot();
  348. tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
  349. }
  350. break;
  351. case 'cust_order' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) {
  352. if (tep_has_product_attributes($HTTP_GET_VARS['pid'])) {
  353. tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['pid']));
  354. } else {
  355. $cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);
  356. }
  357. }
  358. tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
  359. break;
  360. }
  361. }
  362. // include the who's online functions
  363. require(DIR_WS_FUNCTIONS . 'whos_online.php');
  364. tep_update_whos_online();
  365. // include the password crypto functions
  366. require(DIR_WS_FUNCTIONS . 'password_funcs.php');
  367. // include validation functions (right now only email address)
  368. require(DIR_WS_FUNCTIONS . 'validations.php');
  369. // split-page-results
  370. require(DIR_WS_CLASSES . 'split_page_results.php');
  371. // infobox
  372. require(DIR_WS_CLASSES . 'boxes.php');
  373. // auto activate and expire banners
  374. require(DIR_WS_FUNCTIONS . 'banner.php');
  375. tep_activate_banners();
  376. tep_expire_banners();
  377. // auto expire special products
  378. require(DIR_WS_FUNCTIONS . 'specials.php');
  379. tep_expire_specials();
  380. // calculate category path
  381. if (isset($HTTP_GET_VARS['cPath'])) {
  382. $cPath = $HTTP_GET_VARS['cPath'];
  383. } elseif (isset($HTTP_GET_VARS['products_id']) && !isset($HTTP_GET_VARS['manufacturers_id'])) {
  384. $cPath = tep_get_product_path($HTTP_GET_VARS['products_id']);
  385. } else {
  386. $cPath = '';
  387. }
  388. if (tep_not_null($cPath)) {
  389. $cPath_array = tep_parse_category_path($cPath);
  390. $cPath = implode('_', $cPath_array);
  391. $current_category_id = $cPath_array[(sizeof($cPath_array)-1)];
  392. } else {
  393. $current_category_id = 0;
  394. }
  395. // include the breadcrumb class and start the breadcrumb trail
  396. require(DIR_WS_CLASSES . 'breadcrumb.php');
  397. $breadcrumb = new breadcrumb;
  398. $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);
  399. $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT));
  400. // add category names or the manufacturer name to the breadcrumb trail
  401. if (isset($cPath_array)) {
  402. for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) {
  403. $categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$cPath_array[$i] . "' and language_id = '" . (int)$languages_id . "'");
  404. if (tep_db_num_rows($categories_query) > 0) {
  405. $categories = tep_db_fetch_array($categories_query);
  406. $breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1)))));
  407. } else {
  408. break;
  409. }
  410. }
  411. } elseif (isset($HTTP_GET_VARS['manufacturers_id'])) {
  412. $manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
  413. if (tep_db_num_rows($manufacturers_query)) {
  414. $manufacturers = tep_db_fetch_array($manufacturers_query);
  415. $breadcrumb->add($manufacturers['manufacturers_name'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id']));
  416. }
  417. }
  418. // add the products model to the breadcrumb trail
  419. if (isset($HTTP_GET_VARS['products_id'])) {
  420. $model_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
  421. if (tep_db_num_rows($model_query)) {
  422. $model = tep_db_fetch_array($model_query);
  423. $breadcrumb->add($model['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS['products_id']));
  424. }
  425. }
  426. // START STS 4.5.8
  427. require (DIR_WS_CLASSES.'sts.php');
  428. $sts= new sts();
  429. $sts->start_capture();
  430. // END STS 4.5.8
  431. // initialize the message stack for output messages
  432. require(DIR_WS_CLASSES . 'message_stack.php');
  433. $messageStack = new messageStack;
  434. // set which precautions should be checked
  435. define('WARN_INSTALL_EXISTENCE', 'true');
  436. define('WARN_CONFIG_WRITEABLE', 'true');
  437. define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');
  438. define('WARN_SESSION_AUTO_START', 'true');
  439. define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true');
  440. ?>