Is it possible to override the Session Cookie Lifetime found in the sys. config.?
Is it possible to override the Session Cookie Lifetime found in the system configuration?
The reason I ask is because it appears that Magento is not honoring the value I set for Cookie Lifetime no matter what. This is an instance that MANY developers have had their hands in and it seems someone found a way to override it. Any thoughts?
magento-1.9 configuration cookie administration
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
Is it possible to override the Session Cookie Lifetime found in the system configuration?
The reason I ask is because it appears that Magento is not honoring the value I set for Cookie Lifetime no matter what. This is an instance that MANY developers have had their hands in and it seems someone found a way to override it. Any thoughts?
magento-1.9 configuration cookie administration
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
After changing the value, have you cleared all the cache and restarted your web services to ensure the new value has taken effect?
– SR_Magento
Jun 12 '14 at 13:35
Definitely. This is happening on local instances as well. Somewhere in the code.
– sparecycle
Jun 12 '14 at 13:39
add a comment |
Is it possible to override the Session Cookie Lifetime found in the system configuration?
The reason I ask is because it appears that Magento is not honoring the value I set for Cookie Lifetime no matter what. This is an instance that MANY developers have had their hands in and it seems someone found a way to override it. Any thoughts?
magento-1.9 configuration cookie administration
Is it possible to override the Session Cookie Lifetime found in the system configuration?
The reason I ask is because it appears that Magento is not honoring the value I set for Cookie Lifetime no matter what. This is an instance that MANY developers have had their hands in and it seems someone found a way to override it. Any thoughts?
magento-1.9 configuration cookie administration
magento-1.9 configuration cookie administration
edited Feb 15 '17 at 5:25
Nits
1,242314
1,242314
asked Jun 12 '14 at 13:32
sparecycle
79421839
79421839
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
After changing the value, have you cleared all the cache and restarted your web services to ensure the new value has taken effect?
– SR_Magento
Jun 12 '14 at 13:35
Definitely. This is happening on local instances as well. Somewhere in the code.
– sparecycle
Jun 12 '14 at 13:39
add a comment |
After changing the value, have you cleared all the cache and restarted your web services to ensure the new value has taken effect?
– SR_Magento
Jun 12 '14 at 13:35
Definitely. This is happening on local instances as well. Somewhere in the code.
– sparecycle
Jun 12 '14 at 13:39
After changing the value, have you cleared all the cache and restarted your web services to ensure the new value has taken effect?
– SR_Magento
Jun 12 '14 at 13:35
After changing the value, have you cleared all the cache and restarted your web services to ensure the new value has taken effect?
– SR_Magento
Jun 12 '14 at 13:35
Definitely. This is happening on local instances as well. Somewhere in the code.
– sparecycle
Jun 12 '14 at 13:39
Definitely. This is happening on local instances as well. Somewhere in the code.
– sparecycle
Jun 12 '14 at 13:39
add a comment |
2 Answers
2
active
oldest
votes
Check the content of code/core/Mage/Core/Model/Session/Abstract.php
and make sure the file is used. If the lifetime is wrong, check where it is set.
add a comment |
File
code/core/Mage/Core/Model/Session/Abstract.php
public static function buildCookie()
{
require_once 'app/Mage.php';
$request = new Zend_Controller_Request_Http();
session_set_cookie_params(
self::getCookieLifetime()
,self::getDefaultCookiePath()
// ,$request->getHttpHost() // commented out to fix double cookie problem.
,'.domain.com' // added to fix double cookie problem.
,false
,true
);
session_name('frontend');
session_start();
}
2
Modifying core files is strongly in conflict with Magento best practices.
– parhamr
Nov 18 '15 at 23:39
not best way to change core files.
– denish vachhani
Oct 19 '16 at 6:31
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f23804%2fis-it-possible-to-override-the-session-cookie-lifetime-found-in-the-sys-config%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Check the content of code/core/Mage/Core/Model/Session/Abstract.php
and make sure the file is used. If the lifetime is wrong, check where it is set.
add a comment |
Check the content of code/core/Mage/Core/Model/Session/Abstract.php
and make sure the file is used. If the lifetime is wrong, check where it is set.
add a comment |
Check the content of code/core/Mage/Core/Model/Session/Abstract.php
and make sure the file is used. If the lifetime is wrong, check where it is set.
Check the content of code/core/Mage/Core/Model/Session/Abstract.php
and make sure the file is used. If the lifetime is wrong, check where it is set.
answered Jan 30 '16 at 12:35
Fabian Blechschmidt
33.3k663172
33.3k663172
add a comment |
add a comment |
File
code/core/Mage/Core/Model/Session/Abstract.php
public static function buildCookie()
{
require_once 'app/Mage.php';
$request = new Zend_Controller_Request_Http();
session_set_cookie_params(
self::getCookieLifetime()
,self::getDefaultCookiePath()
// ,$request->getHttpHost() // commented out to fix double cookie problem.
,'.domain.com' // added to fix double cookie problem.
,false
,true
);
session_name('frontend');
session_start();
}
2
Modifying core files is strongly in conflict with Magento best practices.
– parhamr
Nov 18 '15 at 23:39
not best way to change core files.
– denish vachhani
Oct 19 '16 at 6:31
add a comment |
File
code/core/Mage/Core/Model/Session/Abstract.php
public static function buildCookie()
{
require_once 'app/Mage.php';
$request = new Zend_Controller_Request_Http();
session_set_cookie_params(
self::getCookieLifetime()
,self::getDefaultCookiePath()
// ,$request->getHttpHost() // commented out to fix double cookie problem.
,'.domain.com' // added to fix double cookie problem.
,false
,true
);
session_name('frontend');
session_start();
}
2
Modifying core files is strongly in conflict with Magento best practices.
– parhamr
Nov 18 '15 at 23:39
not best way to change core files.
– denish vachhani
Oct 19 '16 at 6:31
add a comment |
File
code/core/Mage/Core/Model/Session/Abstract.php
public static function buildCookie()
{
require_once 'app/Mage.php';
$request = new Zend_Controller_Request_Http();
session_set_cookie_params(
self::getCookieLifetime()
,self::getDefaultCookiePath()
// ,$request->getHttpHost() // commented out to fix double cookie problem.
,'.domain.com' // added to fix double cookie problem.
,false
,true
);
session_name('frontend');
session_start();
}
File
code/core/Mage/Core/Model/Session/Abstract.php
public static function buildCookie()
{
require_once 'app/Mage.php';
$request = new Zend_Controller_Request_Http();
session_set_cookie_params(
self::getCookieLifetime()
,self::getDefaultCookiePath()
// ,$request->getHttpHost() // commented out to fix double cookie problem.
,'.domain.com' // added to fix double cookie problem.
,false
,true
);
session_name('frontend');
session_start();
}
answered Jun 12 '14 at 14:24
TBI Infotech
4,5471830
4,5471830
2
Modifying core files is strongly in conflict with Magento best practices.
– parhamr
Nov 18 '15 at 23:39
not best way to change core files.
– denish vachhani
Oct 19 '16 at 6:31
add a comment |
2
Modifying core files is strongly in conflict with Magento best practices.
– parhamr
Nov 18 '15 at 23:39
not best way to change core files.
– denish vachhani
Oct 19 '16 at 6:31
2
2
Modifying core files is strongly in conflict with Magento best practices.
– parhamr
Nov 18 '15 at 23:39
Modifying core files is strongly in conflict with Magento best practices.
– parhamr
Nov 18 '15 at 23:39
not best way to change core files.
– denish vachhani
Oct 19 '16 at 6:31
not best way to change core files.
– denish vachhani
Oct 19 '16 at 6:31
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f23804%2fis-it-possible-to-override-the-session-cookie-lifetime-found-in-the-sys-config%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
After changing the value, have you cleared all the cache and restarted your web services to ensure the new value has taken effect?
– SR_Magento
Jun 12 '14 at 13:35
Definitely. This is happening on local instances as well. Somewhere in the code.
– sparecycle
Jun 12 '14 at 13:39