Please Provide a PDO Driver
- We are using Drupal one of the top three Open Source CMS systems (link), and would love to be able to use SQL Server. We are not alone in this, however several community leaders have been very clear that a PDO driver is needed to make this happen. A long discussion regarding the desire and the need for PDO is available here. So, on behalf of the Drupal community I ask you to please provide a PDO driver. Thank you.
All Replies
- Yes, please add a PDO driver.
- Would be great to see MS move in that direction!
- With PHP5 dominating the web more and more, the ability to connect to a MSSQL database rather easily through PDO could be make MSSQL a real competitor with the other large databases (which would be a good thing!).
- Thanks, everyone. We appreciate the feedback. We're pleased to hear that there is this much interest in a SQL Server driver for PDO, especially within the Drupal community.
We are investigating PDO at the moment as we work on the version 1.1 release of the SQL Server Driver for PHP.
David Sceppa
Program Manager - SQL Server Driver for PHP - I'd like to support this from a user perspective, in a university. I'm running a long-standing Access database with asp as a web front end, the website now needs major development and extension. Drupal is easily the best option, but the future of MySQL is now less than certain, so investing resources in switching to MySQL is not appealing. So a solid Drupal-SQL Server link would be an attractive option, especially for an old Access user.
- Yeah, please. Being able to integrate drupal with ms sql would make life so much easier. So if it needs a PDO driver, then please please help us out.
- If its not too late, this would be a great idea! As someone considering Drupal, but with a MS SQL requirement even for just accessing some data it would make life so much easier to directly connect to the database instead of having to jump through a dozen hoops.
- Would be great if this is possible.
We need this driver too! - How far are you getting along with this? PHP 5.3.0 is now out and I'm wanting to drop my custom classes and start using the PDO with MSSQL.
- Hang on. There's already an ODBC PDO driver in PHP. Why can't you use it with SQL Server?
"On Windows, PDO_ODBC is built into the PHP core by default. It is linked against the Windows ODBC Driver Manager so that PHP can connect to any database cataloged as a System DSN, and is the recommended driver for connecting to Microsoft SQL Server databases." - We could. However, there are several reasons not to. First it doesn't support some of the more recent SQL Server functionality. See here for an example. Second, a native driver can be far faster than an ODBC driver. In short a real PDO driver for SQL is much preferred to a generic ODBC driver.
- I read all of the posts from your link. #166 and #170 seem to solve your problem, and specifically mention the ODBC "SQL Native Client " driver, which was new with SQL Server 2005.
I believe this is the same client used by the SQL Server driver for PHP.
If you create an ODBC system DSN for the "SQL Native Client" driver, you will have ODBC access which is as fast and functional as the SQL Server driver for PHP.
As far as nvarchar is concerned, you're always going to have to convert to and from whatever input/output/internal encoding you are using with PHP, using iconv or other api. I haven't tested nvarchar(max) fields yet, but don't see why the new ODBC driver would return this any differently to nvarchar(4000). - Not only the Drupal community, but the whole PHP community would like to see a unified way to access databases, PDO furfills this requirement quite nicely, provided there are good drivers. thereforI support this request.
@David Sceppa
Dear David, I have just visited the DrupalCon in Paris and I have seen the new stuff coming up with Drupal 7, presented by "webchick".
Please take a look here : http://www.archive.org/details/Drupal7StatusUpdateandNextSteps
and you will see, that having PDO working for Drupal would have a great impact.
As I can see in the Tools you provide from Microsoft (Web Platform Installer 2.0 RC) for the IIS 7 , you already have a "oneclick" Install fro the Drupal 6.x integrated which works perfekt. So for me the next step would be the PDO, so we can prepare all for the Drupal 7 to be a standard on the Server 2008 and IIS7!
For those of you not knowing how to install PHP 5.x and Drupal 6.x on IIS7, just install this Platform Installer and its a no-brainer...
http://www.microsoft.com/web/downloads/platform.aspx
David, I would apreciate to get an update from you here in the forum about the status quo of the PDO and where to download the latest Stable or beta Version.
Regards Andreas- Hello,
Any update about the PDO driver ?


