Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61964 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12556 invoked from network); 2 Aug 2012 13:02:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Aug 2012 13:02:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.170 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.216.170 mail-qc0-f170.google.com Received: from [209.85.216.170] ([209.85.216.170:59003] helo=mail-qc0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4D/84-21438-76A7A105 for ; Thu, 02 Aug 2012 09:02:31 -0400 Received: by qcmt36 with SMTP id t36so6121043qcm.29 for ; Thu, 02 Aug 2012 06:02:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Em5VWf3OjzgnWUGCk5KdzP1VR8qoby7GFjlcmzGnDvM=; b=LqoueDANtiyxpX9ghOwL3h7jP+KjOh++DmQ+6PTJrTSLDStfZp/OUx5OL/S0xAwY8M 6WPw00BR93F1nwPEVTyvhBLmzFmFh52/E/49ut4GiRiZTu0NRLBRgu1ZcNQumJitxwIP hiABT1NQYM0SPnKltxtN/sTWTjTNKLHP6gHz0OXmDAbOIoXYQ2W/hiIPCvDQXc9UY8Pq lOkvwG5IiM98ztU7Dfoh+MySmTLG5Adnvc2+e29WclaEyMpeeYMhITxz4HYXUqY6a1cz 7SL91ZTUx0L2X3dk5wX/nS3aZILZaIwXMV6UWeeor4yUXWOe9hr3ASi9ZMu8OqGgcAZA 8Dvw== MIME-Version: 1.0 Received: by 10.224.1.130 with SMTP id 2mr41417037qaf.61.1343912548353; Thu, 02 Aug 2012 06:02:28 -0700 (PDT) Received: by 10.229.182.4 with HTTP; Thu, 2 Aug 2012 06:02:28 -0700 (PDT) In-Reply-To: <501A775C.2040202@lsces.co.uk> References: <501A69B4.4040401@lsces.co.uk> <501A73B8.3030009@richgray.com> <501A775C.2040202@lsces.co.uk> Date: Thu, 2 Aug 2012 09:02:28 -0400 Message-ID: To: Lester Caine Cc: PHP internals Content-Type: multipart/alternative; boundary=20cf3074b8fe0dc88d04c6480617 Subject: Re: [PHP-DEV] register_globals work arounds From: ircmaxell@gmail.com (Anthony Ferrara) --20cf3074b8fe0dc88d04c6480617 Content-Type: text/plain; charset=ISO-8859-1 Lester, On Thu, Aug 2, 2012 at 8:49 AM, Lester Caine wrote: > rich gray wrote: > >> OK >>> >>> No discussions on why register_globals has been removed we all >>> understand why >>> and now have to live with that ... I'm not winging here! >>> >>> The question is "Does anybody have an 'elegant' fix to quickly update a >>> legacy >>> site that relies on globals to pass variables between page views?" >>> My original quick thought was simply to remap these variables as >>> $_SESSION['var'] so as not to get too deeply into the code base. I've >>> used >>> that in a few quick fixes, but I'm not sure that it is acceptable? I >>> have been >>> passing the variables via $_REQUEST but that obviously needs a lot more >>> work >>> in the html generated, so the session approach would seem better? But >>> needs to >>> observe the European rules on use of cookies :( >>> >>> I'm thinking that what is needed is a sort of PEAR package that would >>> simply >>> be added to every page and be provided with a list of variables to >>> manage, so >>> all we need to do is scan the site for variables and establish which >>> need to >>> be remembered. I've got all sorts of stuff from google/bing searches, >>> but I'm >>> obviously not yet asking the right question ;) Has anybody already been >>> down >>> that track? >>> >>> IMO - this should be posted on PHP general not internals -- have you >> tried >> extract() ? >> http://fr2.php.net/extract >> > > I'm specifically asking in relation to helping users migrate from PHP5.2 > ... trying to expand the documentation of making that process easier. > Pointing at a single manual page is a good example of why we need a more > consistent support for all those users who are not as computer literate as > we would like. That function may be a useful element of solving the > problem, but it does not answer the specific question asked? Register_Globals has been seen (and touted) as bad practice since the 4.2. It was disabled by default as of Feb-5-2002, and in 4.2.0. This is a problem that the vast majority of users solved years ago. If you were still using them in 5.2 a decade later, you've got other problems. The documentation exists. The blog posts exist. But they are old, because this is an old problem. I don't think internals should worry themselves with it. Especially since 5.2 has been EOL for a while now. If you brought this up when 5.3 was being planned, perhaps. But at this point, it's either a general list issue, or MAYBE a docs list issue, but not an internals list issue... But I don't think it's an issue at all. Just my $0.02... Anthony --20cf3074b8fe0dc88d04c6480617--