Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35328 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18291 invoked by uid 1010); 8 Feb 2008 16:38:38 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 18275 invoked from network); 8 Feb 2008 16:38:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Feb 2008 16:38:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=greg@chiaraquartet.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=greg@chiaraquartet.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain chiaraquartet.net from 38.99.98.18 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 38.99.98.18 beast.bluga.net Linux 2.6 Received: from [38.99.98.18] ([38.99.98.18:52608] helo=mail.bluga.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/84-04488-C858CA74 for ; Fri, 08 Feb 2008 11:38:38 -0500 Received: from mail.bluga.net (localhost.localdomain [127.0.0.1]) by mail.bluga.net (Postfix) with ESMTP id 45984C0F475 for ; Fri, 8 Feb 2008 09:38:34 -0700 (MST) Received: from [192.168.0.106] (CPE-76-84-4-101.neb.res.rr.com [76.84.4.101]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bluga.net (Postfix) with ESMTP id E8DC3C0F474 for ; Fri, 8 Feb 2008 09:38:33 -0700 (MST) Message-ID: <47AC8597.4060009@chiaraquartet.net> Date: Fri, 08 Feb 2008 10:38:47 -0600 User-Agent: Thunderbird 2.0.0.6 (X11/20071022) MIME-Version: 1.0 To: internals Mailing List X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: magic_quotes and the question of BC From: greg@chiaraquartet.net (Gregory Beaver) Hello all, Those of you who are saying things like "forget the idiots using magic_quotes" need to understand more clearly what is being proposed. NOBODY is proposing keeping magic_quotes. As of PHP 5.3 and earlier, all applications worth an ounce of anything must check for and handle magic_quotes_runtime. If magic_quotes_runtime is enabled, and you don't handle it, you end up with a bunch of unnecessary slashes in your input. This is VERY different from relying upon magic_quotes_runtime to "safely" escape crap. If the magic_quotes functions are removed, this will unequivocably break *every* decent application written for PHP 5 and PHP 4. As an example, the PEAR Installer uses a disabling routine even though it doesn't do any web access at all. Why? Because magic_quotes_runtime affects file_get_contents(), which is used to read registry files. As such, even though the magic_quotes functionality is never used, the app still has to check for and disable it. If the function magic_quotes_runtime() exists and simply returns false, the PEAR installer continues to work as written without modification. I could certainly modify the latest release to use the if (function_exists()) check that some have proposed, and that would be fine for me, but it is not a good solution for the hundreds of thousands of users we have out there. Why? First of all, very few people actually upgrade to the latest version when it is released. The majority have upgraded by approximately a *year* after the release date, and a large minority (30% or so) do not upgrade for up to 4 years. Now, if Joe Shmoe has a slightly older version of PEAR, and upgrades to PHP 6 (yes, people DO upgrade PHP and still keep their outdated PEAR installations in spite of obvious reasons not to do this, and no, we can't expect to change this from our perch here at php.net), suddenly Joe gets a fatal error, and can no longer use PEAR either to upgrade to a newer version or anything of that nature. Joe wastes a ton of time figuring out what is wrong, and ends up having to manually re-install PEAR. Who would benefit from having the functions removed? People who don't use them don't care, people who do would get a fatal error. Frankly, I don't see why there is any vote whatsoever. It's plain stupid to consider removing them when a fully backwards-compatible solution exists that has no performance penalty, no security penalty, and in fact no penalty at all. There is never any benefit in making the upgrade path harder for our users, come on people. Greg