ID: 16626 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Closed Bug Type: Apache2 related Operating System: All PHP Version: 4.2.1 New Comment:
I'm having the same problem at the moment and it appears to be related to the proxy or rewrite modules in Apache. If you use an Apache proxy server it will only forward the last cookie that your application sets. Applications which expect multiple cookies from the client via an Apache proxy may not work. It worked fine when we used a proxy with Solaris Apache 1.3.24 but does not work using 1.3.26. I tried 1.3.27 on Windows 2000 and it works again. I am currently waiting to test using a 1.3.27 proxy on Solaris. There is some debate as to whether the problem lies in the httpd core, the mod_proxy module or the mod_rewrite. Sorry I have no fix - I'm not a C programmer :( Rgds, Huw Jones. Previous Comments: ------------------------------------------------------------------------ [2002-09-16 05:51:28] [EMAIL PROTECTED] This bug happens anytime I install a bulletin board built for php.. Runnning under WindowsXP PHP Version 4.2.1 using foxserv v3 beta 5... Any bulletin board system when a user or admin tries to move around the cookie isn't saved or something.. So you can login to any forum but as soon as you move to another page your logged out... Very annoying bug as you can't even make it to the admin of your bulletin board to see whats going on. I spent several hours trying to find the root of this problem.. I have no fix.. ------------------------------------------------------------------------ [2002-07-23 19:55:48] [EMAIL PROTECTED] After digging around a bit: in "sapi_apache2.c", in php4 source code, under /sapi/apache2filter, line 102-103 is: else if (sapi_header->replace) apr_table_set(ctx->r->headers_out, sapi_header->header, val); It appears this is triggered with the "Set-Cookie:" header, as if line 103 is changed to apr_table_add(ctx->r->headers_out, sapi_header->header, val); multiple cookies appear to work fine (but I'm sure something else breaks). ------------------------------------------------------------------------ [2002-06-27 21:50:34] [EMAIL PROTECTED] reinstalled php 4.2.2-dev (binary from snaps.php.net; june 27 stable build) with apache 2.0.39 on windows xp. Bug is still here: only the last cookie is set. ------------------------------------------------------------------------ [2002-06-20 18:47:18] [EMAIL PROTECTED] ------------------------------------------------------------------------ [2002-06-20 14:55:19] [EMAIL PROTECTED] I downloaded the latest cvs snapshot (php4.3 on 06/20) from http://snaps.php.net/ and compiled with apache 2.0.39. The setcookie function seems to be working in that release. ------------------------------------------------------------------------ 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/16626 -- Edit this bug report at http://bugs.php.net/?id=16626&edit=1