I was trying to install Drupal 7 with SQL Server on Windows. This is the software version that I was using.

Windows 7 Ultimate
IIS 7.5
PHP 5.3.10 NTS running with FastCGI (http://windows.php.net/downloads/releases/php-5.3.10-nts-Win32-VC9-x86.msi)
SQLServer 2008 R2 Express
SQLServer Native Cliente 12
PDO Driver for PHP 3.0 http://www.microsoft.com/download/en/details.aspx?id=20098
Drupal SQLServer Driver http://drupal.org/project/sqlsrv
Drupal 7 http://ftp.drupal.org/files/projects/drupal-7.12.tar.gz

The problem that I was having is when I tried to install Drupal with the installer of Drupal; when some query is send to the database always get this error

SQLSTATE[42000]: Syntax error at or near ':'

The only semicolon ":" in the query was the placeholder for the values ( for example "SELECT * FROM foo WHERE something = :param1") I guess that the PDO Driver didn't make the replace for the placeholders in bindParam and in Execute.

To solve the problem I installed WebMatrix and I used the php_pdo_sqlserver.dll that is included in IIS Express (included in WebMatrix). With this PDO Driver everything works fine. Watching the properties of the dll apparently the version is 2.0.1802.

I hope this helps.

Comments

omegamonk’s picture

Status: Active » Closed (cannot reproduce)

I am unable to reproduce this error. I checked using both php 5.3 and 5.4 (using the appropriate versions of the pdo driver). i don't see any other issues in the queue that look like they may be related, so I am going to mark this issue as "closed (cannot reproduce)".