0

I am getting this error log for any url hit in my magento..What could be the reason and how to solve this?

2014-11-14T07:49:47+00:00 ERR (3): Notice: Undefined variable: cookieParams  in /var/www/beta_dev/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 94
2014-11-14T07:49:47+00:00 ERR (3): Notice: Undefined variable: cookieParams  in /var/www/beta_dev/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 95
2014-11-14T07:49:47+00:00 ERR (3): Notice: Undefined variable: cookieParams  in /var/www/beta_dev/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 96
2014-11-14T07:49:47+00:00 ERR (3): Notice: Undefined variable: cookieParams  in /var/www/beta_dev/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 97
2014-11-14T07:49:47+00:00 ERR (3): Notice: Undefined variable: cookieParams  in /var/www/beta_dev/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 98
2014-11-14T07:49:47+00:00 ERR (3): Notice: Undefined variable: cookieParams  in /var/www/beta_dev/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 99
2014-11-14T07:49:47+00:00 ERR (3): Notice: Undefined variable: cookieParams  in /var/www/beta_dev/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 108
2014-11-14T07:49:47+00:00 ERR (3): Warning: call_user_func_array() expects parameter 2 to be array, null given  in /var/www/beta_dev/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 108
  • Do you have developer mode enabled? (SetEnv MAGE_IS_DEVELOPER_MODE "true" in .htaccess). – Jonathan Hussey Nov 14 '14 at 8:00
  • @jonathan_hussey If he was running developer mode, the first notice would be fatal. Notices are always logged to system log if the logging is enabled. In fact, turning on developer mode would be a good idea to track down why this variable is not set in one of the deeper parts of the core. – Melvyn Nov 14 '14 at 8:07
  • @Jonathan Hussey No,i didn't set that. – Manikandan Arunachalam Nov 14 '14 at 8:09
  • @Melvyn I know that, I was asking for the reason you also conclude - do we have a call stack to go on. The error posted does not neccessarily give any indication as to the origin of the problem. Manik can you set that then and post the call stack you will see on the frontend. – Jonathan Hussey Nov 14 '14 at 8:41
3

At a guess you have edited your core, as that variable is defined.

See https://github.com/sonassi/magento-ce/blob/1.7.0.0/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php#L86

Restore a clean, unmodified copy of the core.

0

I found the solution..

    // session cookie params
    /*$cookieParams = array(
        'lifetime' => $cookie->getLifetime(),
        'path'     => $cookie->getPath(),
        'domain'   => $cookie->getConfigDomain(),
        'secure'   => $cookie->isSecure(),
        'httponly' => $cookie->getHttponly()
    );*/

This makes the problem.so after uncomment this variable ,my problem solved..

    // session cookie params
    $cookieParams = array(
        'lifetime' => $cookie->getLifetime(),
        'path'     => $cookie->getPath(),
        'domain'   => $cookie->getConfigDomain(),
        'secure'   => $cookie->isSecure(),
        'httponly' => $cookie->getHttponly()
    );
0

No need to mod core file!!!!

Try these settings in : System > Config > Web

Cookie Lifetime: 86400 Cookie Path: / Cookie Domain: Your Domain Use HTTP Only: YES Cookie Restriction Mode: No

Important settings is HTTP Only: YES.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.