Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63864 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85023 invoked from network); 14 Nov 2012 08:01:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Nov 2012 08:01:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes.schlueter@oracle.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=johannes.schlueter@oracle.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain oracle.com designates 141.146.126.69 as permitted sender) X-PHP-List-Original-Sender: johannes.schlueter@oracle.com X-Host-Fingerprint: 141.146.126.69 aserp1040.oracle.com Received: from [141.146.126.69] ([141.146.126.69:37164] helo=aserp1040.oracle.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/00-18422-DDF43A05 for ; Wed, 14 Nov 2012 03:01:34 -0500 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id qAE81TS3009894 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 14 Nov 2012 08:01:30 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id qAE81S3H024883 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 14 Nov 2012 08:01:28 GMT Received: from abhmt111.oracle.com (abhmt111.oracle.com [141.146.116.63]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id qAE81SQD005140; Wed, 14 Nov 2012 02:01:28 -0600 Received: from [10.164.34.199] (/193.9.13.104) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 14 Nov 2012 00:01:27 -0800 To: =?ISO-8859-1?Q?=C1ngel_Gonz=E1lez?= Cc: Anthony Ferrara , PHP internals In-Reply-To: <50A2D672.7010600@gmail.com> References: <50A10A9D.9070402@oracle.com> <50A1946F.8010407@lerdorf.com> <50A20CCB.8090909@lsces.co.uk> <8A8A29F9E43E417FB5450D63019B2DDB@NeiRoze> <8f4231fc-6e3c-4a33-af71-2af5e7a95dfd@email.android.com> <50A2D672.7010600@gmail.com> Content-Type: text/plain; charset="UTF-8" Organization: Oracle Corporation Date: Wed, 14 Nov 2012 09:01:40 +0100 Message-ID: <1352880100.2237.9.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet22.oracle.com [156.151.31.94] Subject: Re: [PHP-DEV] RFC: ext/mysql deprecation From: johannes.schlueter@oracle.com (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Wed, 2012-11-14 at 00:23 +0100, =C3=81ngel Gonz=C3=A1lez wrote: > - The extension is not broken. The problem is the bad usage. > It can be used safely, and good developers have been doing > so for ages, by creating php wrappers. > In magic quotes, the work has been the opposite. The developers > had been detecting the feature in php and *disabling* it. ext/mysql is hard to maintain code. It is not not getting new features. Keeping it up to date for working with new versions of libmysql or mysqlnd versions is work, we probably could spend that time better. > - How many hosts/ISPs have mysqli installed? > I don't have actual numbers, but it used to be much less common > than ext/mysql, which means that unless they those customers > won't be able to run the applications forced to migrate to mysqli. I have barely seen systems having ext/mysql but not mysqli. > - A "magic porting script" has been mentioned on this thread. > It is not on the docs, so it is really as if it didn't exist for the 99% > of the > population. Moreover, there is even a FAQ stating that there are no > migration > scripts right now: > http://php.net/manual/en/faq.databases.php#faq.databases.mysql.deprecated >=20 > It should be linked from every mysql page. Providing a patch to docs is relatively easy )(-> edit.php.net) the mentioned script is a few years old, one should check and test it before adding it to the docs, though. Maybe you can test it? > - If you are sure your ext/mysql usage is safe, it is not possible to > disable the warning > for this functions but keep the other E_DEPRECATED. If the EDEPRECATED is thrown during connect only most people won't see it anyways. As a typical pattern looks like if (!@mysql_connect(....)) { log-and_print( mysql_error() ); } And therefore hiding raw error messages. > - I'm quite sure that there will be a number of problems where the > replacements have > issues, but they are unlikely to be fixed if not forced. For instance, I > remember a php script using mysql that from reading the code, it shouldn'= t be > working but it somehow did. Completely unmaintained, of course. You have years till the last PHP version with ext/mysql will be out of support. Even then it is likely that one could ext/mysql still working on newer versions of PHP (PHP barely changes core extension APIs so people can fetch it from pecl or something, if there is a strong enough demand we might keep aneye on it for awhile on pecl, too) If there are real concerns about mysqli or people struggling while migrating they can feel free to talk to us and we can assist. johannes --=20 Johannes Schl=C3=BCter, MySQL Connectors Team, ORACLE Corporation