Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8523921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:32:47+00:00 2026-06-11T07:32:47+00:00

I am running PHP Magento 1.4.1.1 and I am storing a cookie with user

  • 0

I am running PHP Magento 1.4.1.1 and I am storing a cookie with user preferences.

I use this to store the cookie.

umask(0);
Mage::app();
Mage::getModel('core/cookie')->set('lunch', 'user likes tuna fish', (60*60*24));

Now this works fine to save the cookie… but if I try and update the or delete the cookie I don’t see any change.

I try and set the cookie with new data like so:

umask(0);
Mage::app();
Mage::getModel('core/cookie')->set('lunch', 'user likes hamburgers', (60*60*24));

and usually a second cookie is created with the exact same name, domain and path.

Also if I try to delete instead of change I use this:

umask(0);
Mage::app();
Mage::getModel('core/cookie')->delete('lunch');

with no changes to the cookie.

I have also used delete like this:

Mage::getModel('core/cookie')->delete('lunch', '/', 'www.domain.com');
Mage::getModel('core/cookie')->delete('lunch', '/', '.domain.com');
Mage::getModel('core/cookie')->delete('lunch', '/', 'domain.com');

With no luck either.

Any ideas?

FYI… I am outside of root folder.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:32:49+00:00Added an answer on June 11, 2026 at 7:32 am

    Ok, on this one I ended up solving myself… but was causing the problem. The variable I was passing while using set was not set itself… send NULL or FALSE. apparently Magento won’t set a cookie if this is FALSE or NULL

    So again solution was Make sure value is set.

    Mage::getModel('core/cookie')->set('lunch', $SET_VALUE_HERE, (60*60*24));
    

    Also I seemed to have more luck using set with a zero at the end to kill the cookie.

    Mage::getModel('core/cookie')->set('lunch', $SET_VALUE_HERE, 0 );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Magento Production version 1.2.1 store running on linux centos. I want to hide all
Running Magento with multiple stores. The base store works perfectly. On the secondary store
I am running Magento CE 1.6.0. I have a unique store. I can see
I am running a Magento Store and have created a seperate login outside of
Running php app/console doctrine:migrations:diff generates a new migration class as required to translate the
I have a magento site running on nginx with php-fcgi. I have set up
I have a Magento store running inside of a frameset. Paypal recently updated their
When running PHP with Apache I know that the php core and all libraries
I'm getting the below error in a Magento PHP file running a CREATE TABLE
I'm running PHP on a Linux server and I'm generating bash scripts for use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.