Closed (won't fix)
Project:
Drupal driver for SQL Server and SQL Azure
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Feb 2011 at 10:11 UTC
Updated:
28 Nov 2015 at 14:19 UTC
Jump to comment: Most recent
Comments
Comment #1
jamesodmitchell commentedDoes this only work on IIS is my question? I have tried it now on a Windows XP machine with XAMPP and still not showing the driver in the install screen?
Please advise.
James
Comment #2
damien tournoud commentedThe PDO driver for SQL Server only works on the Windows platform. It will work regardless of the web server you are using, and should theoretically (as far as I know) work on Windows XP.
Comment #3
damien tournoud commentedSee the exact system requirements here:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=80e44913-24b...
You are most likely missing th SQL Server 2008 R2 Native Client.
Comment #4
heine commentedYou also need a PHP PDO driver for SqlServer:
http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx
Comment #5
bg1 commentedI need a MSSQL driver for Drupal running on Linux (not for the Drupal database, but for a MSSQL database running on another server in our environment that contains all of the Transaction Processing data which is run through other dedicated applications.
Can anyone tell me what works?
Thanks in advance.
Comment #6
designingsean commentedI believe the question the original poster had was this:
Does the Drupal 7 SQL Server driver that is being developed here only work on Windows PHP installs? His question is the same as mine.
I have PHP on a Linux box with Apache, and I have a mssql driver installed and active (FreeTDS). I have placed the sqlsrv folder provided by this project in the includes/database folder as instructed.
Yet when I am stepping through the install for Drupal 7, I do not have the option to use SQL Server, as the instructions say should be available.
Thoughts?
Comment #7
kung_fu_mike commentedThe PDO sql srv method will not work on Linux/MAC connectiong to a SQL Server database. The way Drupal determines what databases are available to you on install, is to look at the installed drivers, I *think* by file name if I remember correctly. The it cross references that with all of the php pdo_WHATEVER libs you have installed.
If you wanted a dblib driver to show up (so you could connect to to SQL Srv). you would have to:
1) rename the driver file and the hard reference of the string 'sqlsrv' to 'dblib'
2) you would have to gut the PDO class variable and function calls from the lib. I don't know how hard it would be, I haven't had time. I, tragically, got forced on to IIS
Comment #8
mtiftSubscribing
Comment #9
damien tournoud commentedThis driver currently relies on the Microsoft PDO driver for SQL Server, as clearly stated on the project page.
I am open to making this work on other access methods for SQL Server, but my hopes are not high it will work. What we need at the minimum is:
* Proper support for binary columns
* Proper support for unicode (nvarchar, ntext) columns
* Consistent support for transactions
Last time I looked into this (but it was at least one year ago), the dblib/freetds driver was totally unable to properly fetch and store data in unicode columns. It might have changed. In that case, there might be luck.
Comment #10
Renee S commentedHi Damien, thanks for the update. Now that Microsoft has released the SQL ODBC Server Driver for RHEL, is this looking more likely now?
Comment #11
rawl747 commentedAnything new on this issue? I too attempted to get this combination to work but ran into the issue that the PHP calls that Drupal7 wants to make only work with the version of the database drivers (sqlsrv & PDO_sqlsrv) that run on Win platforms. The deprecated open source libs for MS SQL Serverl (mssql and PDO_mssql)) that run on Linux (Ubuntu) will not play nice with the database includes that come with the MS sponsored Drupal7 installation (Aquia Drupal).
There is some demand from clients out there for a cross platform solution with everything but the database running on a LAMP stack (minus the M) and an MS SQL Server database.
I'd love to see someone with more Linux knowledge than I try, to tweak the source code files MS has provided for their PHP drivers replacing the references to Win includes files with Linux equivalents and trying for a successful compile.
That or finally see Microsoft come out with PHP drivers for Ubuntu that will work and accept sqlsrv and PDO_sqlsrv calls.
This approach of trying to own the whole shebang isn't cool MS! Play nice in the sandbox please...
Comment #12
marquito commentedhey guys... we already have a Moodle installation working in this scenario: linux + php5 + freetds + sql server.
but we just can't figure out how to link drupal to sql server in the same manner.
what configs should we use? any ideas?
we're going crazy with this because it seems so simple yet it does not work.
Comment #13
Remon commentedIn an effort to mitigate connecting to sql server from*nix enviroments, I created a dblib fork.
I only renamed "sqlsrv" occurrences to "dblib" and -unfortunately- had to comment out code snippets that do not work with dblib. I'm using it for a Drupal installation running on mac os and connected to a sql server 2008 and it has been ok for me so far.
Comment #14
andypost@Remon how does it works with charsets?
Also MS now have a native odbc drivers for linux http://www.microsoft.com/en-us/download/details.aspx?id=28160
Comment #15
FreeFox commentedI don't know if this will help you but probably there will be some useful information in it.
http://drupal.org/node/1892310
Comment #16
andypost@FreeFox thanx a lot, it works
Comment #17
chandan_jha18 commented@FreeFox, in your post with the steps, when I go through the settings.php code you posted for connection information, it looks like it needs an existing setup with mysql and then with some module you want to pull the data into sql server.
What if I have a brand new setup for Drupal first time on a Linux box? I don't think we can touch settings.php as this is the file which gets populated when from the Drupal administration, we choose a database of our choice and then populate it. If I edit settings.php file manually, it gives me an error ' Drupal database already set up'
I can see Microsoft SQL Server as an option, have configured FreeTDS, registered a DSN and can use that DSN through iSQL. I am not able to go beyond it.
Thanks
Chandan
Comment #18
david_garcia commentedThe sqlsrv team has stated that the next pdo driver will be Linux compatible. Only for PHP7 and beyond though. There is nothing we can do to fix this here.
Comment #19
andypostThe only way now is use https://www.drupal.org/project/dblib
Comment #20
KG2 commentedHi andypost and everyone else,
If https://www.drupal.org/project/dblib is the only way to connect from drupal (ubuntu, mysql) to an external mssql database - what has happened to it?
Where is the download and instructions?
I am very confused. I followed these instructions https://blog.thesysadmins.co.uk/ubuntu-server-connect-to-mssql-via-php.html and my ubuntu server can connect to mssql (php - from both command line, browser and Adminer), but not the drupal site.
I added the connection to settings.php and would like to use Views Database Connector but everything I read for mssql points to versions of dblib that are no longer available.
I would appreciate any assistance