ID:               16803
 Comment by:       webmaster at microwebsolutions dot com
 Reported By:      cabel-s at panic dot com
 Status:           Bogus
 Bug Type:         Apache2 related
 Operating System: RedHat 7.2
 PHP Version:      4.2.0
 New Comment:

Bugs bugs bugs!!!

I am developing a shopping cart system with PHP, and so far my only
problem seems to be adding items to a shopping cart.

When the user leaves, I would like them to be able to come back and
have the items they were looking at, available, so they do not have to
shop again. I was accomplishing this WITH COOKIES.

Windows 2000 Pro (NT 5 IIS4+) PHP 4.3.2

Situation:  Using cookies as a Session..

Cookies I use:   CartCount;  and then there are Cart1 Cart2 Cart3,
which represent part of CartCount and hold their own Item Name,
Description Price and More.

Problems I am having:

CartCount adds correctly, but the cookie for Cart1 does not save the
name, only its data..

This is so screwed up; I have been fighting with cookies for the last
14 hours, and I can't figure out what I am supposed to do.

I am using the setcookie() event.

Here is an example:

The part where you see:  *  1 Quantity, the name of the cart "Cart1" is
missing. It makes NO SENSE!!!, and I dont think the cookies are working
right, or I may be using it wrong.

setcookie ("Cart" . $CartCount + 1, $newcookie, time()+259200); # timer
is set to 3 days...

CartCount
7
localhost/
1024
3881114496
29571799
1754203984
29571196
*
1
Quantity%5B1%5D+ItemName%5Bnnnnnnn%5D+ItemDescription%5BThe+Item+is+Tall%5D+ItemPrice%5B45%5D+ItemTax%5B5%5D+ItemShipping%5B15%5D%BB
localhost/
1024
3881114496
29571799
1752793984
29571196
*



I hope someone out there can help


Previous Comments:
------------------------------------------------------------------------

[2002-06-20 10:03:46] red at tripany dot com

Well after extensive testing, I have to conclude it's probably not a
php (alone) problem.
I have tried:
PHP ver.     Apache ver.    --enable-so    works?   error
---------------------------------------------------------
4.2.1            2.0.39             yes       no     yes
2.1              36                 yes       yes    no
2.0              39                 yes       no     yes
2.0              36                 no        no     yes
2.0              36                 yes       yes    no
4.0.3pl1         1.3.9              ?         yes    ?

(4.0.3pl1 is the standard debian package)
The rest of the 2.1 installations (with apache 39) don't work and give
errors, so there's some problem with the apxs interaction between php
and httpd 2.0.39. As php2.1.0 works with httpd 2.0.36 I'm now assuming
there was a change in the apxs of apache in the security fix version
which renders the multiple cookies unwriteable. I'll send this off to
apache as well.
Cheers
Robin

------------------------------------------------------------------------

[2002-06-20 07:52:21] red at tripany dot com

PS I get the same make error when installing php4.2.0 and removing line
93 from php_functions.c (it's the boundary function again) finishes the
install. Under 4.2.0, I get the same behaviour, so maybe it is apache?

------------------------------------------------------------------------

[2002-04-30 15:26:26] [EMAIL PROTECTED]

read the documentation for header(). it replaces headers with the same
name unless you tell it otherwise. (the issue with setcookie() probably
could very well be a bug, but we've got #16626 to track that.)

------------------------------------------------------------------------

[2002-04-30 14:09:57] kala at pinerecords dot com

Hi,

just wondering.. is anyone working on a fix at all?
I understand this is a rather critical issue.

Thanks,
Tom

------------------------------------------------------------------------

[2002-04-24 19:26:34] cabel-s at panic dot com

Hello! Thanks for your note -- of course I searched first! 
:)

As I say first in my notes, bug #16626 is very similar and 
may even be the same problem -- it details problems using 
setcookie() -- but I thought filing this bug would be 
helpful because it details that the problem also exists 
with header(), not just setcookie(). Is that not helpful 
for you guys? If so, let me know, and I'll close this.

I searched for all "open" bugs with the string "header", 
and with PHP version 4.2.0 (since this relates to Apache 
2), and found nothing.

I'm sorry -- if this IS truly a duplicate bug, I am unable 
to find its friends right away, but I will keep looking! If 
I find something, I'll mark it duplicate.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/16803

-- 
Edit this bug report at http://bugs.php.net/?id=16803&edit=1

Reply via email to