Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55227 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6483 invoked from network); 5 Sep 2011 14:24:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Sep 2011 14:24:52 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.161.170 mail-gx0-f170.google.com Received: from [209.85.161.170] ([209.85.161.170:46204] helo=mail-gx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CA/E6-64330-1BBD46E4 for ; Mon, 05 Sep 2011 10:24:51 -0400 Received: by gxk27 with SMTP id 27so3580673gxk.29 for ; Mon, 05 Sep 2011 07:24:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=XfxU4Q4jIq1DOBkWUPWmDyVR7+mdRJ8JDYuOmMtpeyA=; b=lBe0bbFRpPubPP5iUAEXpbOLL4s0z/jyUyEtdfQrC3E8PTXqkbmUyEFlqncPQxRlv5 XKCGb0VNEov/njR8KDdA2lCsRJ+nGntKYrmlQynJoE9if6Aqb9UHIZnrtIvfkxtzrCHz wzxTeX8H/y7la2+CW3ZKG07tNQ/8NJQJambQg= MIME-Version: 1.0 Received: by 10.150.160.9 with SMTP id i9mr3087498ybe.29.1315232686693; Mon, 05 Sep 2011 07:24:46 -0700 (PDT) Received: by 10.147.182.15 with HTTP; Mon, 5 Sep 2011 07:24:46 -0700 (PDT) In-Reply-To: References: Date: Mon, 5 Sep 2011 16:24:46 +0200 Message-ID: To: Derick Rethans Cc: PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] drop TZ environment variable support in 5.4+? From: pierre.php@gmail.com (Pierre Joye) On Mon, Sep 5, 2011 at 4:05 PM, Derick Rethans wrote: > On Mon, 5 Sep 2011, Pierre Joye wrote: > >> The main problem is that putenv and getenv are not thread safe and >> many tests will fail either when using TS SAPIs or on Windows. This >> method is already deprecated and it is recommended to rely on the >> other methods. >> >> Objections/comments? > > I'm against removing this in PHP 5.4. What's the arguement then? It should not have been supported since years already. > Tests run all in different processes so the environment variable can't > leak between them. the main problem here is the production code relying on putenv, not only our testing environments. But your case only covers the classic run-tests.php executed from CLI/CGI. We run most of the phpt via apache's mod_php as well. It is very easy for one to update an app to make it work with museum version of php as well: if (function_exists('date_default_timezone_set')) { date_default_timezone_set("UTC"); } else { putenv("TZ=UTC"); } Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org