Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25843 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24302 invoked by uid 1010); 27 Sep 2006 17:04:36 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 24287 invoked from network); 27 Sep 2006 17:04:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Sep 2006 17:04:36 -0000 Authentication-Results: pb1.pair.com header.from=andrei@gravitonic.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=andrei@gravitonic.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain gravitonic.com from 204.11.219.139 cause and error) X-PHP-List-Original-Sender: andrei@gravitonic.com X-Host-Fingerprint: 204.11.219.139 lerdorf.com Linux 2.5 (sometimes 2.4) (4) Received: from [204.11.219.139] ([204.11.219.139:38509] helo=lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 89/D1-08641-22FAA154 for ; Wed, 27 Sep 2006 13:04:36 -0400 Received: from [66.228.175.145] (borndress-lm.corp.yahoo.com [66.228.175.145]) (authenticated bits=0) by lerdorf.com (8.13.7/8.13.7/Debian-1) with ESMTP id k8RH4Wa9017806 for ; Wed, 27 Sep 2006 10:04:32 -0700 Mime-Version: 1.0 (Apple Message framework v624) Content-Transfer-Encoding: 7bit Message-ID: <03a49eb85c1b86038c5d127230bd3f78@gravitonic.com> Content-Type: text/plain; charset=US-ASCII; format=flowed To: PHP Internals Date: Wed, 27 Sep 2006 10:03:41 -0700 X-Mailer: Apple Mail (2.624) Subject: Per-request UG(unicode) From: andrei@gravitonic.com (Andrei Zmievski) Andi asked me to forward this, since it didn't go through to the list on the first try. > Hi, > > The following is a patch Dmitry did to change UG(unicode) to be > configurable > per-request. The guidelines from Andrei was that it shouldn't make the > extension code much more complicated and with this patch it doesn't. > As it > is, most of the logic is already decided upon at runtime so this patch > shouldn't have significant performance impact. > Some reasons to do it: > A) Per-virtual host configuration of UG(unicode) is very important for > any > server running multiple sites on the same machine. > B) Running multiple apps on the same machine will most probably > require some > apps to run with Unicode on and some with it off. > C) We are discovering some BC quirks with the current Unicode > implementation > (md5() for example). It's not clear if/how we can resolve those quotes > in a > transparent way or not. Making the UG(unicode) flag flexible will > significantly help in migrations which might be lengthier than expected > (having two versions in separate vhosts running on the same box for > migration purposes). > > Anyway, although the diff is big the change to extension authors is > very > minimal and we did the hard work already. Please check it out and see > if it > works on your machine. I think unless there are very significant > reasons not > to include this, we really should. Not allowing per-vhost selection of > Unicode setting will cripple PHP 6 for anyone who isn't running on a > dedicated server, and for some companies like Zend, who run more than > one > app on the same machine, it could also cripple things on dedicated > servers. > > Thx. > > Andi > The patch is available at: http://www.php.net/~andrei/u-5.diff -Andrei