Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> MSSql PDO problem z połączeniem
PROGer
post
Post #1





Grupa: Zarejestrowani
Postów: 63
Pomógł: 0
Dołączył: 30.04.2015

Ostrzeżenie: (0%)
-----


Witam,

Mam problem z połaczeniem się z bazą danych MSSql w wersji 9.0001399.00 (2005). Uprzedzę pytania i dodam że zmiana na nowsza nie wchodzi w tym przypadku w grę. Dodatkowo inne prehistoryczne lelementy to PHP v. 5.2.6 i Apache v 2.2

Połaczenie testuję poprzez (nie wiem czy poprawnie):

  1. <?php
  2. try {
  3.  
  4. $db = new PDO('odbc:Driver={SQL Server};Server=localhost;Database=TEST02; Uid=TEST02\User1;Pwd=Password2');
  5.  
  6. } catch (PDOException $e) {
  7.  
  8. echo $e->getMessage();
  9. }
  10. ?>


Sterowniki które umieściłem w php/ext i które zadeklarowałem w php.ini na samym końcu to:
extension=php_pdo_sqlsrv_52_nts_vc6.dll
extension=php_pdo_sqlsrv_52_ts_vc6.dll
extension=php_pdo_sqlsrv_53_nts_vc6.dll
extension=php_pdo_sqlsrv_53_nts_vc9.dll
extension=php_pdo_sqlsrv_53_ts_vc6.dll
extension=php_pdo_sqlsrv_53_ts_vc9.dll


Test wyrzuca mimo to błąd:
could not find driver

Co może być nie tak?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
PROGer
post
Post #2





Grupa: Zarejestrowani
Postów: 63
Pomógł: 0
Dołączył: 30.04.2015

Ostrzeżenie: (0%)
-----


  1. Array ( [0] => sqlsrv ) SQLSTATE[IMSSP]: This extension requires either the Microsoft SQL Server 2008 Native Client (SP1 or later) or the Microsoft SQL Server 2008 R2 Native Client ODBC Driver to communicate with SQL Server. Neither of those ODBC Drivers are currently installed. Access the following URL to download the Microsoft SQL Server 2008 R2 Native Client ODBC driver for x86: <a href="http://go.microsoft.com/fwlink/?LinkId=163712" target="_blank">http://go.microsoft.com/fwlink/?LinkId=163712</a>


Tak jak pisałem to prehistoryczna wersja, nie moge jej zmienić niestety.
Jak mogę wlączyć mssql i odbc? W php.ini są włączone .... nie wiem co może być nie tak w takim razie.
Go to the top of the page
+Quote Post

Posty w temacie
- PROGer   MSSql PDO problem z połączeniem   7.05.2015, 09:42:47
- - Turson   Restart Apache był?   7.05.2015, 09:50:46
- - PROGer   Tak był oczywiście. Wycinek z końca php.ini'...   7.05.2015, 09:51:58
|- - Phillipfophy   I had acquired some lube ahead of time which he cu...   4.09.2019, 23:02:20
- - Pyton_000   poczytaj to: http://stackoverflow.com/questions/11...   7.05.2015, 09:52:56
- - PROGer   Przeczytałem, ale nic to nie wniosło. Próbuje poł...   7.05.2015, 10:14:37
- - salfunglandyare   Dodaj php_pdo_odbc.dll i sprobuj jak wcześniej - o...   7.05.2015, 11:55:12
- - PROGer   ściągnąłem ten dll, umieściłem w php/ext, dodałem ...   7.05.2015, 12:02:21
- - salfunglandyare   jeszcze taka jedna rzecz: * print_r(PDO::getAvaila...   7.05.2015, 12:16:19
- - PROGer   Array ( [0] => sqlsrv ) could not find driver d...   7.05.2015, 12:29:14
- - salfunglandyare   oznacza to, że masz załadowany tylko driver sqlsrv...   7.05.2015, 12:42:35
- - PROGer   [PHP] pobierz, plaintext Array ( [0] =...   7.05.2015, 12:54:30
- - salfunglandyare   wklej te sekcje php.ini po zmianach, jestes pewien...   7.05.2015, 13:07:54
- - PROGer   Coś dziwnego ... w php.ini mam: [PHP] pobierz, p...   7.05.2015, 13:19:14
- - salfunglandyare   A PHP instalowałeś z XAMMPa? DLLki rozszerzeń same...   7.05.2015, 13:42:08
- - PROGer   Restartowałem Windowsa. Serwer stawiałem bez użyc...   7.05.2015, 15:20:18
- - salfunglandyare   Sprawdź zmienną systemową PATH, sprawdź czy powiąz...   7.05.2015, 15:34:30
- - PROGer   Znalazłem w sieci podobny problem tu: [PHP] pobie...   8.05.2015, 07:11:06
- - Brettzep   The good news is there was no pain. But the sensat...   9.09.2019, 15:59:25


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 3.10.2025 - 01:05