<?php function remote_addr_set() { if ($ip = get_real_ip_address()) { $_SERVER['REMOTE_ADDR'] = $ip; } }
function clear_expired_session_data() { $CI =& get_instance(); //use $_SESSION because we need to see expire $sess_data = isset($_SESSION) ? $_SESSION : array(); foreach($sess_data as $sess_key => $sess_data_row) { if (is_array($sess_data_row) && isset($sess_data_row['expire'])) { if ($sess_data_row['expire'] <= time()) { $CI->session->unset_userdata($sess_key); } } }
} function setup_mysql() { $CI =& get_instance();
//Makes sure we have a simple mode that doesn't have strict restrictions $CI->db->query('SET SESSION sql_mode=""'); $CI->db->query('SET SESSION optimizer_switch="index_merge_intersection=off"'); }
//Loads configuration from database into global CI config function load_config() { $CI =& get_instance();
if ($CI->db->table_exists('app_config')) { foreach($CI->Appconfig->get_all()->result() as $app_config) { $CI->config->set_item($app_config->key,$app_config->value);
if ($app_config->key == 'number_of_items_per_page' && $CI->agent->is_mobile()) { $CI->config->set_item($app_config->key,20); } }
Comments
6 comments
Did you make any changes to
Application/hooks/setup_phppos.php
attach this file and I can take look
That looks fine
Try removing
CI->db->query('SET SESSION sql_mode=""');
Does this happen all the time? Can you give me access to server (send to chris@phppos.com) will look tomorrow
IN application/config/database.php
FIND
$db['default']['stricton'] = TRUE;
REPALCE
$db['default']['stricton'] = FALSE;
Remove the entire line that has either
$db['default']['stricton'] = FALSE;
$db['default']['stricton'] = TRUE;
Hi Chris,
Removing the entire line:
solved the issue.
Thanks!
Please sign in to leave a comment.