Answered Errors when trying to install SQL server drivers

  • 19 มีนาคม 2555 11:18
     
     

    Hi,

    I am trying to install the above drivers with PHP version 5.3.6. I have php_sqlsrv_53_nts.dll in my PHP ext folder, and php.ini is definitely using the right extension_dir path, and I've added the dll extension. The error log for PHP has this error:
    'PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\Program Files ' - The specified module could not be found.
     in Unknown on line 0'

    And I also get the following error when trying to connect to the SQL server using PHP:
    'Connection could not be established. Array ( [0] => Array ( [0] => IMSSP [SQLSTATE] => IMSSP [1] => -49 [code] => -49 [2] => This extension requires the Microsoft SQL Server 2011 Native Client. Access the following URL to download the Microsoft SQL Server 2011 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712 [message] => This extension requires the Microsoft SQL Server 2011 Native Client. Access the following URL to download the Microsoft SQL Server 2011 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712 ) [1] => Array ( [0] => IM002 [SQLSTATE] => IM002 [1] => 0 [code] => 0 [2] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified [message] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified ) ) '

    There is definitely an installation of the SQL Server native client on my computer.

    I've tried uninstalling and reinstalling PHP (as I read somewhere that the later version I was using didn't support the SQL server driver, so I'm now using 5.3). I've also tried moving the PHP ext folder, in case it was something to do with the file path.

    Can anyone suggest anything? Let me know if any more info is needed.

    Thanks

ตอบทั้งหมด

  • 19 มีนาคม 2555 14:48
     
      มีโค้ด

    Are you using version 2.0 or version 3.0 of php_sqlsrv_53_nts.dll?

    Have you got quotes around your extension dir? e.g.:

    extension_dir="C:\Program Files\PHP\ext"
    For driver version 3.0 you need:
    1. A 32-bit version of PHP
    2. A web server (e.g. IIS or Apache) configured to launch PHP using FastCGI.
    3. ODBC driver "SQL Server Native Client 11.0" ( SQL Server 2012 Native Client )

    * or * for driver version 2.0 you need:

    1. A 32-bit version of PHP
    2. A web server (e.g. IIS or Apache) configured to launch PHP using FastCGI.
    3. ODBC driver "SQL Server Native Client 10.0" ( SQL Server 2008 Native Client )


    Rob

  • 19 มีนาคม 2555 16:07
     
     คำตอบ
    Thanks so much, that looks like it has worked. I was using v 3.0 (on IIS), but didn't have v 11.0 of the client.
    • ทำเครื่องหมายเป็นคำตอบโดย Jonathan GuerinMicrosoft 19 มีนาคม 2555 18:36
    •  
  • 19 มีนาคม 2555 18:35
     
     

    FYI, we have fixed the mistake in the error message and it will go out with the new 5.4 build.

    Thanks!

    Jonathan


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

  • 30 มีนาคม 2555 16:54
     
     

    I guess a followup set of questions come to mind. 

    Are there any issues installing the sql server 2012 native client alongside the 2008 native client? Do they live side by side, or does the 2012 native client replace the 2008 native client? I don't want to impact our non php .net based apps on our production systems. 

    If the answer to the first is one we can't live with, then are there any updates to the 2.0 driver since the 11/2011 version I had installed before? We are having some bugs with Drupal on Windows doing schema updates, usually renaming or modifying columns on tables, and were hoping some of this may have been resolved with the 3.0 driver plus php and drupal updates due now. 

    thanks!

  • 30 มีนาคม 2555 17:14
     
     

    I guess a followup set of questions come to mind. 

    Are there any issues installing the sql server 2012 native client alongside the 2008 native client? Do they live side by side, or does the 2012 native client replace the 2008 native client? I don't want to impact our non php .net based apps on our production systems. 

    If the answer to the first is one we can't live with, then are there any updates to the 2.0 driver since the 11/2011 version I had installed before? We are having some bugs with Drupal on Windows doing schema updates, usually renaming or modifying columns on tables, and were hoping some of this may have been resolved with the 3.0 driver plus php and drupal updates due now. 

    thanks!

    Both of the SNAC 2008R2 and 2012 components can be installed side-by-side. :)

    Thanks,

    Jonathan


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