cart is empty after add to cart (in private window working fine) magento 1.9.2 programmatically.

i've used
  

    $cart = Mage::getSingleton('checkout/cart'); //getModel
                                    $cart->init(); 
                                    $cart->addProduct($product, $qty);                                // update session
                                    $session->setCartWasUpdated(true);
    								$cart->save();
    								$quote->setIsActive(1);
    								$quote->collectTotals()->save();
    								Mage::getSingleton('checkout/session')->setCartWasUpdated(true);