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

[eluser]KristenBlackburn[/eluser]
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
#2

[eluser]pzntec[/eluser]
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?
<code>
$config['cookie_prefix'] = "";
$config['cookie_domain'] = "";
$config['cookie_path'] = "/";
$config['cookie_secure'] = FALSE;
</code>




Theme © iAndrew 2016 - Forum software by © MyBB