Welcome Guest, Not a member yet? Register   Sign In
Cookies only setting in certain browsers

Ive tested my project on Maxthon, IE10, Chrome, Opera, and Firefox. Also installed cookie viewers for each browser, the only browsers which set cookies are chrome and firefox, the rest of the browsers fail to set cookies, leaving the session to return The action you have requested is not allowed.

define('CI_VERSION', '2.1.3');

$config['cookie_prefix'] = "";
$config['cookie_domain'] = ($_SERVER['SERVER_NAME'] == 'localhost' ? '' : preg_replace('/^www\./', '', $_SERVER['SERVER_NAME']));
$config['cookie_path'] = "/";
$config['cookie_secure'] = TRUE;

A little help on whats going wrong would be appreciated, thank you

I think your globals and the function preg_replace confuses things. The preg_replace should be configured into the .htaccess file instead.

Have you tried the default settings?
$config['cookie_prefix'] = "";
$config['cookie_domain'] = "";
$config['cookie_path'] = "/";
$config['cookie_secure'] = FALSE;

Theme © iAndrew 2016 - Forum software by © MyBB