check first that $_SERVER['REMOTE_ADDR'] exists and is not empty on tep_get_ip_address() function