Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28361 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45813 invoked by uid 1010); 15 Mar 2007 19:21:17 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 45798 invoked from network); 15 Mar 2007 19:21:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Mar 2007 19:21:16 -0000 Authentication-Results: pb1.pair.com header.from=ceo@l-i-e.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ceo@l-i-e.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain l-i-e.com from 67.139.134.202 cause and error) X-PHP-List-Original-Sender: ceo@l-i-e.com X-Host-Fingerprint: 67.139.134.202 o2.hostbaby.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (2) Received: from [67.139.134.202] ([67.139.134.202:4364] helo=o2.hostbaby.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/D6-32700-AAC99F54 for ; Thu, 15 Mar 2007 14:21:15 -0500 Received: (qmail 86969 invoked by uid 98); 15 Mar 2007 19:21:15 -0000 Received: from 127.0.0.1 by o2.hostbaby.com (envelope-from , uid 1013) with qmail-scanner-1.25 (clamdscan: 0.88.7/2840. Clear:RC:1(127.0.0.1):. Processed in 0.07673 secs); 15 Mar 2007 19:21:15 -0000 X-Qmail-Scanner-Mail-From: ceo@l-i-e.com via o2.hostbaby.com X-Qmail-Scanner: 1.25 (Clear:RC:1(127.0.0.1):. Processed in 0.07673 secs) Received: from localhost (HELO l-i-e.com) (127.0.0.1) by localhost with SMTP; 15 Mar 2007 19:21:15 -0000 Received: from 216.230.84.67 (SquirrelMail authenticated user ceo@l-i-e.com) by www.l-i-e.com with HTTP; Thu, 15 Mar 2007 14:21:15 -0500 (CDT) Message-ID: <49068.216.230.84.67.1173986475.squirrel@www.l-i-e.com> In-Reply-To: <10845a340703150215v1dfe329ev8aaff25e3fcb5cbf@mail.gmail.com> References: <10845a340703140437q519bd232sc9b7dca53cef1e91@mail.gmail.com> <45F84785.9030304@fischer.name> <10845a340703150215v1dfe329ev8aaff25e3fcb5cbf@mail.gmail.com> Date: Thu, 15 Mar 2007 14:21:15 -0500 (CDT) To: RQuadling@GoogleMail.com Cc: "Markus Fischer" , "internals" Reply-To: ceo@l-i-e.com User-Agent: Hostbaby Webmail MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: [PHP-DEV] A request for code change : Repeated opening and closing the session leads to a LOT of Set-Cookie headers. From: ceo@l-i-e.com ("Richard Lynch") On Thu, March 15, 2007 4:15 am, Richard Quadling wrote: > 1 - It doesn't matter what the server side handler is > (files/user/sqlite/mm/etc), session data is not stored until you do a > session_write_close(). So for a separate process to have access to the > data, the session must be closed. You could, in theory, write your own "SetSessionData" function which stored into $_SESSION and *also* updated something somewhere immediately, for the external process to read... It would probably suck for large amounts of session data, but could work nicely and solve your problem otherwise. I'm not saying PHP shouldn't be smart enough to only send the one header, as it is already caching other headers and only sending one unless you add that second arg to header() anyway, so all the hooks are there -- Just that you could fix it today instead of waiting on a change to PHP source to happen. > I see this as an easy fix with possible a miniscule performance > increase as the header won't need to be sent when it is not needed. > OOI. It may be a better solution to detect duplicate headers in the > sapi_add_header_ex() function. Maybe. Do whatever is done by the Userland header() function, which buffers headers and only sends one. That's been working for ages. :-) > Please add this little patch as it will mean AJAX with IE and PHP > sessions will all play nicely with each other and there is no need to > add additional userland code to deal with locking as PHP sessions do > EXACTLY what is required. I think you still need locking in PHP Userland for concurrent access to be meaningful to most developers... Otherwise you end up with a race condition in the session save handler. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?