Announce: PDO beta releases

php.internals

Wez Furlong

21 years ago
You may have noticed my "drive-by release" of various different PDO packages tonight/this morning. This is stage one of the "PDO push". I'd like to encourage you all to try it out; as you should know, we're going to be releasing PDO as part of PHP 5.1, so we need as many people as possible to play around with it to discover any remaining issues. Some drivers have had more testing and support than others, simply because they are easier or more convenient to develop and test against. If you find any missing features, inconsistencies between drivers, bugs or crashes, please report them using the PECL bug tracking system. Please categorize bugs correctly, and, if possible, try out more than one driver. If you have the same problem for more than one driver, report the bug using the PDO bug reporting page, otherwise use the bug reporting page for your driver. The bug reporting pages can be found by visiting http://pecl.php.net/<extensionname> and clicking on the "Package Bugs" link. Please don't submit the same problem more than once; add your feedback to existing bugs if it is appropriate. During the PDO push, I want to release updated PDO packages at the end of each day in which a bug is found and fixed. Please help me with this task by reporting any issues as clearly and completely as possible. Now is the time to test and evaluate PDO; if we don't get enough feedback over the next couple of weeks, it won't make it into PHP 5.1 and you'll have to wait until the next major PHP release. You'll no doubt be wondering how to use PDO, so here are some useful resources: The PHP manual: http://www.php.net/manual/en/ref.pdo.php Various posts from my blog; some information is slightly outdated, one of the links includes slides from one of my talks on PDO at the php|works conference last year: http://netevil.org/node.php?uuid=41572e4a-0757-8311-6093-1572e4a93e1b http://netevil.org/node.php?uuid=415464e0-6270-1081-4799-15464e02aa74 http://netevil.org/node.php?uuid=a1907cf3-1afc-4ffe-b36b-a17b405fbeb5 http://netevil.org/node.php?uuid=bf0a58d7-68ab-49d0-9a29-f5ec97c5dfde My article on the Oracle Technology Network giving an overview of PDO. Again, some information my be slightly outdated. http://www.oracle.com/technology/pub/articles/php_experts/otn_pdo_oracle5.html Also during the PDO push, I'll be working with Dan to help flesh out the official PHP documentation for PDO, and quite probably blogging little handy snippets for some of the newer/more advanced features. Thanks for your attention, and looking forward to your feedback. --Wez.

Daniel Convissor

21 years ago
Hi Wez: On Wed, Feb 09, 2005 at 12:55:46AM -0500, Wez Furlong wrote:
> > I'd like to encourage you all to try it out; as you should know, we're > going to be releasing PDO as part of PHP 5.1, so we need as many > people as possible to play around with it to discover any remaining > issues.
...
> If you find any missing features, inconsistencies between drivers, > bugs or crashes, please report them using the PECL bug tracking
Do you have a set of test scripts somewhere that should produce the same results regardless of which driver is being used? Kind of like the PEAR DB test suite. Or is each individual person going to have to make up their own tests? Thanks, --Dan
-- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

Wez Furlong

21 years ago
Dan Scott mentioned to me that he has someone that is (or soon will be) working on a test suite. While a test-suite is good, it's also good for people to actually sit down and try to use it in their own way. --Wez. On Wed, 9 Feb 2005 01:32:08 -0500, Daniel Convissor <danielc@analysisandsolutions.com> wrote:

D . Walsh

21 years ago
Is there a mysterious trick to use it on Mac OSX 10.3.x?? -- Dale On Feb 09, 2005, at 02:04, Wez Furlong wrote:

Lester Caine

21 years ago
Wez Furlong wrote:
> I'd like to encourage you all to try it out; as you should know, we're > going to be releasing PDO as part of PHP 5.1, so we need as many > people as possible to play around with it to discover any remaining > issues.
As a longtime user of ADOdb, converting to something new may not be practical, but at least Firebird is on the list which makes a nice change. I'm not seeing an easy route to getting hold of a copy to play with (windows :( ) and I'm not seeing much in the function list yet. Can anybody give any feedback on what is missing at the moment mapped against ADOdb functionality? Is it worth me spending time digging into this just yet, or should I wait for some of missing functionality to be addressed ;)
-- Lester Caine ----------------------------- L.S.Caine Electronic Services

Wez Furlong

21 years ago
On Wed, 09 Feb 2005 08:41:50 +0000, Lester Caine <lester@lsces.co.uk> wrote:
> I'm not seeing an easy route to getting hold of a copy to play with > (windows :( ) and I'm not seeing much in the function list yet.
http://snaps.php.net/win32/PECL_5_0/ has binaries for all PDO packages (including MS-SQL, which doesn't show up in the PECL package list yet).
> Is it worth me spending time digging into this just yet, or should I > wait for some of missing functionality to be addressed ;)
The API is feature complete (although some drivers don't implement as many features as they could yet). NOW is the time to investigate it for yourself; it will be too late otherwise. --Wez.

Lester Caine

21 years ago
Wez Furlong wrote:
>>I'm not seeing an easy route to getting hold of a copy to play with >>(windows :( ) and I'm not seeing much in the function list yet. > > http://snaps.php.net/win32/PECL_5_0/ has binaries for all PDO packages > (including MS-SQL, which doesn't show up in the PECL package list > yet).
Somewhere I've not been before ;)
>>Is it worth me spending time digging into this just yet, or should I >>wait for some of missing functionality to be addressed ;) > > The API is feature complete (although some drivers don't implement as > many features as they could yet).
How are Blob references handled? Sequence management? No Caching? How do we access metadata? LIMIT/FIRST management in SQL?
> NOW is the time to investigate it for yourself; it will be too late otherwise.
I start with a check that the tables I need exist, independent of the different SQL requirements of the different engines. On a quick overview, there is nothing to replace MetaTables() ? ADOdb makes differences in SQL formats between databases transparent, is that something that PDO will address? The other area is transparent creation of databases independent of engine. What I am seeing at the moment is only a subset of the problem addressed.
-- Lester Caine ----------------------------- L.S.Caine Electronic Services

Wez Furlong

21 years ago
Please read the various links that I posted in the announcement; they explain a number of design goals about PDO (particularly the OTN article) that will answer your questions in more detail. Here are some quick answers: On Wed, 09 Feb 2005 16:28:38 +0000, Lester Caine <lester@lsces.co.uk> wrote:
> How are Blob references handled?
As streams. This is still not fully supported in all places yet; it should have better support and docs over this next week.
> Sequence management?
None.
> No Caching?
None.
> How do we access metadata?
There are methods.
> LIMIT/FIRST management in SQL?
None. Consider scrollable cursors as an alternative for databases that don't have LIMIT/FIRST.
> I start with a check that the tables I need exist, independent of the > different SQL requirements of the different engines. On a quick > overview, there is nothing to replace MetaTables() ? > ADOdb makes differences in SQL formats between databases transparent, is > that something that PDO will address?
No. That is something for another layer. PDO is intended to be a very light layer with minimal interference.
> The other area is transparent creation of databases independent of engine. > What I am seeing at the moment is only a subset of the problem addressed.
Not in this release of PDO. --Wez.

Lester Caine

21 years ago
Wez Furlong wrote:
> Please read the various links that I posted in the announcement; they > explain a number of design goals about PDO (particularly the OTN > article) that will answer your questions in more detail.
Not into Oracle ;) , but it answers the main questions. PDO is not planned to be a replacement for ADOdb.
> No. That is something for another layer. PDO is intended to be a > very light layer with minimal interference.
Until all engines can use the same SQL there is little point in a generic layer that means you have to re-engineer the queries when ever you switch engines ? Unless it is very much faster than the existing drivers, in which case I'd switch the Firebird ADOdb driver to use it :) So I'm looking at a different level of the Abstraction Model. It's bad enough catering for the differences AFTER ADOdb has taken off the rough spots ;)
-- Lester Caine ----------------------------- L.S.Caine Electronic Services

Wez Furlong

21 years ago
On Wed, 09 Feb 2005 17:16:07 +0000, Lester Caine <lester@lsces.co.uk> wrote:
> Not into Oracle ;) , but it answers the main questions. PDO is not > planned to be a replacement for ADOdb.
Correct.
> > No. That is something for another layer. PDO is intended to be a > > very light layer with minimal interference. > > Until all engines can use the same SQL there is little point in a > generic layer that means you have to re-engineer the queries when ever > you switch engines ? Unless it is very much faster than the existing > drivers, in which case I'd switch the Firebird ADOdb driver to use it :) > So I'm looking at a different level of the Abstraction Model.
One of the major aims of PDO is to eventually replace the existing database extensions in PHP, not to provide total abstraction (which is a impossible goal in the opinions of many seasoned developers). --Wez.

Lester Caine

21 years ago
Wez Furlong wrote:
> One of the major aims of PDO is to eventually replace the existing > database extensions in PHP, not to provide total abstraction (which is > a impossible goal in the opinions of many seasoned developers).
Have not found a problem building cross database packages. As long as you avoid STARTING from MySQL, then most things can be transparent. It would be nice to link in 'Triggers' but until the other engines support them properly ... Total abstraction does require removing some of the inconsistencies in SQL, but it is certainly not impossible. It MAY be 'expensive' in terms of processing time, but that is the trade off between single engine code and generic anyway. Lukas - I see little point in trying to get LIMIT into Oracle until the preferred method of working is included in SQL2003. MSSQL would need convincing to change it as well, but I prefer the more natural SELECT FIRST n SKIP x. So LIMIT n OFFSET x is not a 'done deal' ;) There are a lot more subtle variations which cause a lot more problems than that anyway :)
-- Lester Caine ----------------------------- L.S.Caine Electronic Services

Lukas Smith

21 years ago
Lester Caine wrote:
> Not into Oracle ;) , but it answers the main questions. PDO is not > planned to be a replacement for ADOdb. > >> No. That is something for another layer. PDO is intended to be a >> very light layer with minimal interference. > > > Until all engines can use the same SQL there is little point in a > generic layer that means you have to re-engineer the queries when ever > you switch engines ? Unless it is very much faster than the existing > drivers, in which case I'd switch the Firebird ADOdb driver to use it :) > So I'm looking at a different level of the Abstraction Model. > > It's bad enough catering for the differences AFTER ADOdb has taken off > the rough spots ;)
There are two parts to database abstraction. 1) client API 2) SQL PDO addresses 1) quite nicely and takes very specific stabs at 2) .. mainly prepare/execute, error codes, LOB Anything beyond that gets to ugly that its probably more feasible to do in PHP userland anyways. This was the original intention of the extension and it has remained unchanged todate. We are lobbying Oracle to add limit support, but thats another topic. BTW: I am working on PEAR::MDB2 to become as API compatible as possible with PDO. This has the benefit of giving a PHP4 package that people can use today with the PDO API so that they can move to PDO easily once they are ready to make the jump to PHP5. Also this will enable people to easily move to MDB2 from PDO if they need the additional abstraction. At the same time I will eventually also provide PDO based drivers which should be much improved in speed (and maintainability) compared to the old drivers. Contributions are welcome :-) regards, Lukas

Rasmus Lerdorf

21 years ago
Lukas Smith wrote:
> We are lobbying Oracle to add limit support, but thats another topic.
If that happens I want royalties! -Rasmus

Dan Scott

21 years ago
On Wed, 9 Feb 2005 00:55:46 -0500, Wez Furlong <kingwez@gmail.com> wrote:
> You may have noticed my "drive-by release" of various different PDO > packages tonight/this morning. > > This is stage one of the "PDO push".
Woo-hoo! The world rejoices (well, at least this small part of the world). <snip />
> The PHP manual: > http://www.php.net/manual/en/ref.pdo.php
I've committed a number of changes since the manual was last built; is there a manual refresh in the works, or would Livedocs be able to handle the testers' load if we linked to that? To stay in sync with Wez, I would like to be able to ensure that testers / early adopters are using the latest docs (particularly if the API needs to change), thus avoiding the filing of bogus bugs as much as possible... Dan

Sean Coates

21 years ago
Dan Scott wrote:
>>The PHP manual: >>http://www.php.net/manual/en/ref.pdo.php > > I've committed a number of changes since the manual was last built; is > there a manual refresh in the works, or would Livedocs be able to > handle the testers' load if we linked to that?
http://livedocs.phpdoc.info/pdo Please play nicely with my bandwidth. S

Jacques Marneweck

21 years ago
Dan Scott wrote:
>On Wed, 9 Feb 2005 00:55:46 -0500, Wez Furlong <kingwez@gmail.com> wrote: > > >I've committed a number of changes since the manual was last built; is >there a manual refresh in the works, or would Livedocs be able to >handle the testers' load if we linked to that? > >To stay in sync with Wez, I would like to be able to ensure that >testers / early adopters are using the latest docs (particularly if >the API needs to change), thus avoiding the filing of bogus bugs as >much as possible... > >Dan > >
Hi Dan, The livedocs over on http://livedocs.php.mirrors.powertrip.co.za/ updates every two hours via a cron job. If need be I can hook up another box to serve the livedocs site as well depending on the load on that box which currently serves the livedocs and setup DNS round robin. The box uses the turck mmcache to boost PHP performance, so I'd love to actually throw some load against livedocs to test it. Regards --jm

Wez Furlong

21 years ago
We've kicked off a doc build for php.net; it should update "soon" and percolate down to the mirrors. --Wez. On Wed, 09 Feb 2005 18:18:43 +0200, Jacques Marneweck <jacques@php.net> wrote:

Jacques Marneweck

21 years ago
Wez Furlong wrote:
>We've kicked off a doc build for php.net; it should update "soon" and >percolate down to the mirrors. > >--Wez. > >
Hi Wez, In the interim I've fixed the issue with http://livedocs.php.mirrors.powertrip.co.za/ and it includes the pdo docs. :) Regards --jm

Marc Richards

21 years ago
Wez Furlong wrote:
> You may have noticed my "drive-by release" of various different PDO > packages tonight/this morning. > > This is stage one of the "PDO push".
Are there plans for a mysqli driver for PDO? I searched around but I couldn't seem to find an answer. Is it a technical limitation or simply a lack of resources? Not trying to be pushy, I am just curious. Marc

George Schlossnagle

21 years ago
On Feb 9, 2005, at 7:45 PM, Marc Richards wrote:
> Wez Furlong wrote: >> You may have noticed my "drive-by release" of various different PDO >> packages tonight/this morning. >> This is stage one of the "PDO push". > > Are there plans for a mysqli driver for PDO? I searched around but I > couldn't seem to find an answer. > > Is it a technical limitation or simply a lack of resources? Not trying > to be pushy, I am just curious.
I volunteered to do it if no one else did, but I keep failing to find hours 30 and 31 in my day. George

Marc Richards

21 years ago
George Schlossnagle wrote:
> > On Feb 9, 2005, at 7:45 PM, Marc Richards wrote: > >> Wez Furlong wrote: >> >>> You may have noticed my "drive-by release" of various different PDO >>> packages tonight/this morning. >>> This is stage one of the "PDO push". >> >> >> Are there plans for a mysqli driver for PDO? I searched around but I >> couldn't seem to find an answer. >> >> Is it a technical limitation or simply a lack of resources? Not trying >> to be pushy, I am just curious. > > > I volunteered to do it if no one else did, but I keep failing to find > hours 30 and 31 in my day. > > George
I know how you feel. Thanks for responding. Marc

John Coggeshall

21 years ago
I've been itching to code, and I actually wrote this once upon a time and lost it when my laptop harddrive bombed. I'll take this up and try to get it out by Monday -- I don't have much planned for the weekend. Cheers, John On Wed, 2005-02-09 at 21:14, Marc Richards wrote:

Marc Richards

21 years ago
awesome. good luck. Marc John Coggeshall wrote: