Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20016 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44238 invoked by uid 1010); 15 Nov 2005 17:21:21 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 44223 invoked from network); 15 Nov 2005 17:21:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Nov 2005 17:21:21 -0000 X-Host-Fingerprint: 64.233.184.198 wproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.184.198:12340] helo=wproxy.gmail.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id E5/24-07637-1191A734 for ; Tue, 15 Nov 2005 12:21:21 -0500 Received: by wproxy.gmail.com with SMTP id i24so1283600wra for ; Tue, 15 Nov 2005 09:21:15 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=aat/PPvqE8sB6FGJlyYI80E6+iwzGwru19+Osd17+Cc/ZH4bzATy4d7fD3JJdHDuX4PtRcxZoItEcWjG4jATSoIOkZB/i1gm4JiJ2DcYQFL9P4S+YL+G7seDGg6qeMArrAAEQUhZT56Eq3W34u8ctDRPCkMKdngVtMkCHspFvBI= Received: by 10.54.101.18 with SMTP id y18mr5086460wrb; Tue, 15 Nov 2005 09:21:14 -0800 (PST) Received: by 10.54.76.6 with HTTP; Tue, 15 Nov 2005 09:21:14 -0800 (PST) Message-ID: <4e89b4260511150921vac0a3e7sf39d246bcfb90339@mail.gmail.com> Date: Tue, 15 Nov 2005 12:21:14 -0500 To: Steph Fox Cc: internals In-Reply-To: <0ab001c5ea06$6277aa00$52906751@foxbox> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <099001c5ea00$3eecc0d0$52906751@foxbox> <4e89b4260511150852p2de5dd76h105b0aaa77f2f6f2@mail.gmail.com> <0ab001c5ea06$6277aa00$52906751@foxbox> Subject: Re: [PHP-DEV] Upgrade notes for 5.1 From: kingwez@gmail.com (Wez Furlong) I would say something like this: In PHP 5.0, SQLite 2 support was provided by the sqlite extension. With the introduction of PDO, the sqlite extension now also provides a 'sqlite2' driver for PDO; this means that the sqlite extension depends upon the PDO extension. PHP 5.1 ships with a number of alternative interfaces to sqlite: ext/sqlite provides the "classic" sqlite procedural and OO API that you've used in prior versions of PHP. It also provides the 'sqlite2' PDO driver to allow you to access sqlite databases created with earlier versions of PHP. ext/pdo_sqlite provides the 'sqlite' version 3 driver. SQLite version 3 is vastly superior to SQLite version 2, but the file formats of the two versions are not compatible. Which should you use? If your project is already written and working against PHP 5.0, then you can continue to use ext/sqlite without problems. New projects should use PDO and the 'sqlite' (version 3) driver, as this is faster than SQLite 2 and supports prepared statements and binary columns natively. The 'sqlite2' driver for PDO is provided as a convenience for accessing legacy SQLite 2 databases, created either by older versions of PHP, or by external processes that can only generate SQLite 2 databases. I'd also suggest that all the PDO extensions be built shared to facilitate easier upgrades via PECL as new features are developed there, but that's just me. --Wez. On 11/15/05, Steph Fox wrote: > Draft 1: > > In PHP 5.0, SQLite 2 support was built-in. Due to the advent of SQLite 3 > and PHP Data Objects, the SQLite engine is no longer statically built int= o > PHP by default. The PDO_SQLITE driver communicates with the SQLite 3 engi= ne, > and the sqlite extension remains in place only for reasons of back > compatibility. > Note that the sqlite extension is now reliant on PDO under win32. The > intention > is to allow support for legacy SQLite 2 code alongside newly written SQLi= te > 3 > code; the PDO, sqlite and PDO_SQLITE extensions should all be enabled. > > Somewhere between Draft 1 and Draft 2, I picked up the info that you can > write SQLite 2 code for PDO via DSN =3D sqlite2. I've no idea why anyone > would want to do that, but it's there... > > > ----- Original Message ----- > From: "Wez Furlong" > To: "Steph Fox" > Cc: "internals" > Sent: Tuesday, November 15, 2005 4:52 PM > Subject: Re: [PHP-DEV] Upgrade notes for 5.1 > > > I wouldn't "strongly" recommend the use of PDO when upgrading; that's > sending the wrong message. I'd "warmly" recommend that the use of PDO > be considered for new projects. > > The sqlite information is wrong. This is the way it is: > > ext/sqlite bundles sqlite version 2. The extension provides the "good > old" ext/sqlite API and also implements the 'sqlite2' driver for PDO. > If you need to access SQLite version 2 databases, you need this > extension. Use of sqlite version 2 should be avoided in new projects, > as sqlite version 3 is vastly superior. > > ext/pdo_sqlite bundles sqlite version 3. It provides the 'sqlite' PDO > driver. It's use is recommended for all new projects that want to use > SQLite. > > --Wez. > > On 11/15/05, Steph Fox wrote: > > Hi all, > > > > I've already canvassed Ilia and Stas - can anyone else think of anythin= g > > I've missed/mis-explained here? > > > > Thanks guys/guyess, > > > > - Steph > > > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >