MSVCR90 fault with Sql Server driver RRS feed

  • Question

  • I have been hitting various forums hoping to find a clue. I am trying to get Drupal 7 working with sql server but fail with a fault part way through the installation. The exact spot varies from run to run. I am able to complete the run installing with mysql so I believe my php setup is good. I am using the latest sql server driver as of a day ago. I am using php 5.3.8 non threaded VC 9 version of php in a fast-cgi application. I have also replicated this problem from the command line with drush. 

    Right now I am trying to verify that if I comment out the transaction code, I get farther in the install. Could be a dead end but I got from 27 tables loaded to 32. 


    Log Name:      Application

    Source:        Application Error

    Date:          10/4/2011 6:22:37 AM

    Event ID:      1000

    Task Category: (100)

    Level:         Error

    Keywords:      Classic

    User:          N/A

    Computer:      ASUS-LT


    Faulting application name: php-cgi.exe, version:, time stamp: 0x4e537f4b

    Faulting module name: MSVCR90.dll, version: 9.0.30729.6161, time stamp: 0x4dace5b9

    Exception code: 0xc0000005

    Fault offset: 0x0003ae7a

    Faulting process id: 0x8bc

    Faulting application start time: 0x01cc8287613cdae8

    Faulting application path: C:\Program Files (x86)\PHP\php-cgi.exe

    Faulting module path: C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\MSVCR90.dll

    Report Id: 29979694-ee7b-11e0-afe1-00235421655d


    Wednesday, October 5, 2011 2:42 AM


  • Can you try to apply that patch (http://drupal.org/node/1300312) ?

    Don't have a tool to patch ? Just go to /includes/database/sqlsrv/database.inc and replace

    '/^RELEASE SAVEPOINT (.*)$/' => '-- $0',


    '/^RELEASE SAVEPOINT (.*)$/' => 'SELECT 1 /* $0 */',

    Should be somewhere near line #294



    Wednesday, October 5, 2011 7:05 PM

All replies

  • Is this on Windows with IIS?

    I don't know the answer to this, but exception 0xc0000005 usually means access denied, probably because of a bad memory address.

    Are you using the compatible version of the SQLSRV driver, i.e. php_sqlsrv_53_nts_vc9.dll?

    What version of the Visual C++ 2008 x86 redistributable have you got installed?  Your path to MSVCR90.dll is different to mine.

    Try reinstalling from here: http://www.microsoft.com/download/en/details.aspx?id=11895


    Wednesday, October 5, 2011 12:11 PM
  • yes the non threaded version of both the php driver and pdo driver. Thanks for the response. Yes, it is IIS not apache. 

    I have finally gotten closer to a a clue about what is happening. I had suspected transactions where the culprit for quite awhile, but even though I had set the drupal option that disables transaction support, it turns out they were still being used. I edited the drupal sql server driver and explicitly told it that it didn't support transactions. viola, everything worked. 

    There is no override of what drupal does with transactions. There is this, but it seems related to drupal not sql server




     * Workaround a bug in the database autoloader by defining all the child classes.


     * @see http://drupal.org/node/851136


    class DatabaseTransaction_sqlsrv extends DatabaseTransaction { }



    Can I assume the the class DatabaseTransaction is provided by the pdo driver from Microsoft here, php_pdo_qlsrv_53_nts_vc9.dll? 

    Wednesday, October 5, 2011 5:05 PM
  • PS. I uninstalled every version, x86 and x64 of the Visual c++ 2008 redistributable on my box and installed the versions I newly downloaded today. Yes, there were 6 versions there, many years of software development on this computer.

    The error was the same and the version number was the same. 



    Wednesday, October 5, 2011 5:13 PM
  • Hi Philip,


    The SQL Server driver for Drupal is actually an extension developed for Drupal by The Commerce Guys.

    Firstly, if you have questions about the implementation, you should post these at the Drupal site:

    Secondly, the DatabaseTransaction class is not provided not by our PDO driver, but most likely by Drupal's database abstraction layer. It sounds like you might be running into a bug in either (or both) the PHP engine, or Drupal itself.

    Finally, there is an issue identified with Drupal and PHP 5.3.8 which we're working on tracking down. In the meantime, could you please try with PHP 5.3.6 instead and see if this resolves your issue?



    This posting is provided 'AS IS' with no warranties, and confers no rights.

    Wednesday, October 5, 2011 6:52 PM
  • Can you try to apply that patch (http://drupal.org/node/1300312) ?

    Don't have a tool to patch ? Just go to /includes/database/sqlsrv/database.inc and replace

    '/^RELEASE SAVEPOINT (.*)$/' => '-- $0',


    '/^RELEASE SAVEPOINT (.*)$/' => 'SELECT 1 /* $0 */',

    Should be somewhere near line #294



    Wednesday, October 5, 2011 7:05 PM
  • And this worked. Thanks for the fast reply. 
    Friday, October 7, 2011 1:41 AM
  • This worked for me as well ... Thanks
    Thursday, December 29, 2011 6:31 AM