|
ZenCart_Documentation
1.5.0
http://www.collinsharper.com
|
00001 <?php 00008 if (!defined('SESSION_USE_ROOT_COOKIE_PATH') || !defined('SESSION_ADD_PERIOD_PREFIX')) 00009 { 00010 $sql = "SELECT configuration_group_id FROM " . TABLE_CONFIGURATION_GROUP . " 00011 WHERE configuration_group_title = 'Sessions'"; 00012 $result = $db->execute($sql); 00013 if ($result->RecordCount() > 0) 00014 { 00015 $id = $result->fields['configuration_group_id']; 00016 } else 00017 { 00018 $id = 15; 00019 } 00020 if (!defined('SESSION_USE_ROOT_COOKIE_PATH')) 00021 { 00022 $sql = "INSERT INTO " . TABLE_CONFIGURATION . " 00023 SET configuration_key = 'SESSION_USE_ROOT_COOKIE_PATH', 00024 sort_order = '999', 00025 configuration_title = 'Use root path for cookie path', 00026 configuration_value = 'False', 00027 configuration_description = 'Normally Zen Cart will use the directory that a store resides in as the cookie path. This can cause problems with some servers. This setting allows you to set the cookie path to the root of the server, rather than the store directory. It should only be used if you have problems with sessions. <strong>Default Value = False</strong><br /><br /><strong>Changing this setting may mean you have problems logging into your admin, you should clear your browser cookies to overcome this.</strong>' , 00028 configuration_group_id = " . (int)$id . ", 00029 set_function = 'zen_cfg_select_option(array(\'True\', \'False\'), ' 00030 " ; 00031 $result = $db->execute($sql); 00032 } 00033 if (!defined('SESSION_ADD_PERIOD_PREFIX')) 00034 { 00035 $sql = "INSERT INTO " . TABLE_CONFIGURATION . " 00036 SET configuration_key = 'SESSION_ADD_PERIOD_PREFIX', 00037 sort_order = '999', 00038 configuration_title = 'Add period prefix to cookie domain', 00039 configuration_value = 'True', 00040 configuration_description = 'Normally Zen Cart will add a period prefix to the cookie domain, e.g. .www.mydomain.com. This can sometimes cause problems with some server configurations. If you are having session problems you may want to try setting this to False. <strong>Default Value = True</strong>', 00041 configuration_group_id = " . (int)$id . ", 00042 set_function = 'zen_cfg_select_option(array(\'True\', \'False\'), ' 00043 " ; 00044 $result = $db->execute($sql); 00045 } 00046 }