francisco j sanchez wrote:
> hello. I have been working on this bug for days now, and have scoured
> these forums and the web to no avail. I am fairly new to PHP, so
> please forgive me if I don't provide the right info.
> here is the problem:
> as of 9 days ago, when someone arrives at a document on our site via
> google (or directly to a document on our site via any method), and
> they add it to their cart, and then navigate to the cart, it is empty.
>  if you navigate around the site first, all is well.
> here is the grand anomaly:
> i have the EXACT SAME code running on 80 and 9090 (normally, 9090 is a
> testing site pointing to its own directory, but since this bug
> surfaced, i've changed things).  The bug can be reproduced over and
> over again on 80, and never on 9090.  they are also using the same db.
> here is how to recreate it:
> go to and add to
> cart.  check the cart by clicking the "Cart" link in the nav.  it is
> empty.  now, go to
> and add to
> cart.  check the cart by clicking the same nav link, and the doc is
> there, in the cart.   ???  clear your cookies to reproduce, and, don't
> be logged in.
> here is some background:
> i am using Qcodo 0.5, PHP 5.2.6, apache 2.2, mysql 14.12.  box and
> services hosted by godaddy.  i have reverted the repo (SVN) to a known
> working version with the same results.  in any file that you land on,
> including view.php, there is a call to
> require_once(../includes/ which calls session_start().
>  although, i understand that is implicit with any $_SESSION['foo']
> assignments.  in any case, session_start() should be called within
>  the id of the doc is successfully added to the
> session variable $_SESSION['cart'] in an array, and can be output to
> the page after adding the doc, but when you navigate away (either by
> going to the cart directly, or clicking 'checkout'), the session
> variable has disappeared.  when clicking on checkout, it should take
> you to the register/login page, unless the cart is empty, in which
> case you are redirected to the search page.
> please let me know if you need any more information.  any help would
> be _very_much_appreciated_!!!
> thanks!
> --fjs--

It's a cookie problem.  When you visit and
click add to cart and then click any link it the nav the links in the
nav point to (notice the absence of www).  The
cookie is per domain and is different than depending on your settings.


PHP General Mailing List (
To unsubscribe, visit:

Reply via email to