Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> MSSql PDO problem z połączeniem
PROGer
post 7.05.2015, 09:42:47
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 7.05.2015, 09:51:58
Post #2





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

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


Tak był oczywiście.

Wycinek z końca php.ini''
  1. [gd]
  2. ; Tell the jpeg decode to libjpeg warnings and try to create
  3. ; a gd image. The warning will then be displayed as notices
  4. ; disabled by default
  5. ;gd.jpeg_ignore_warning = 0
  6.  
  7. [exif]
  8. ; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS.
  9. ; With mbstring support this will automatically be converted into the encoding
  10. ; given by corresponding encode setting. When empty mbstring.internal_encoding
  11. ; is used. For the decode settings you can distinguish between motorola and
  12. ; intel byte order. A decode setting cannot be empty.
  13. ;exif.encode_unicode = ISO-8859-15
  14. ;exif.decode_unicode_motorola = UCS-2BE
  15. ;exif.decode_unicode_intel = UCS-2LE
  16. ;exif.encode_jis =
  17. ;exif.decode_jis_motorola = JIS
  18. ;exif.decode_jis_intel = JIS
  19.  
  20. [Tidy]
  21. ; The path to a default tidy configuration file to use when using tidy
  22. ;tidy.default_config = /usr/local/lib/php/default.tcfg
  23.  
  24. ; Should tidy clean and repair output automatically?
  25. ; WARNING: Do not use this option if you are generating non-html content
  26. ; such as dynamic images
  27. tidy.clean_output = Off
  28.  
  29. [soap]
  30. ; Enables or disables WSDL caching feature.
  31. soap.wsdl_cache_enabled=1
  32. ; Sets the directory name where SOAP extension will put cache files.
  33. soap.wsdl_cache_dir="/tmp"
  34. ; (time to live) Sets the number of second while cached file will be used
  35. ; instead of original one.
  36. soap.wsdl_cache_ttl=86400
  37.  
  38. ; Local Variables:
  39. ; tab-width: 4
  40. ; End:
  41. [PHP_CURL]
  42. extension=php_curl.dll
  43. [PHP_GD2]
  44. extension=php_gd2.dll
  45. [PHP_LDAP]
  46. extension=php_ldap.dll
  47. [PHP_MBSTRING]
  48. extension=php_mbstring.dll
  49. [PHP_MCRYPT]
  50. extension=php_mcrypt.dll
  51. [PHP_MSSQL]
  52. extension=php_mssql.dll
  53. [PHP_MYSQL]
  54. extension=php_mysql.dll
  55. [PHP_XMLRPC]
  56. extension=php_xmlrpc.dll
  57. [PHP_GETTEXT]
  58. extension=php_gettext.dll
  59. [PHP_PDO]
  60. extension=php_pdo.dll
  61. [PHP_PDO_MSSQL]
  62. extension=php_pdo_mssql.dll
  63. [PHP_PDO_MYSQL]
  64. extension=php_pdo_mysql.dll
  65. [PHP_PDO_OCI8]
  66. ;extension=php_pdo_oci8.dll
  67. [PHP_OCI8]
  68. extension=php_oci8.dll
  69.  
  70. extension=php_pdo_sqlsrv_52_nts_vc6.dll
  71. extension=php_pdo_sqlsrv_52_ts_vc6.dll
  72. extension=php_pdo_sqlsrv_53_nts_vc6.dll
  73. extension=php_pdo_sqlsrv_53_nts_vc9.dll
  74. extension=php_pdo_sqlsrv_53_ts_vc6.dll
  75. extension=php_pdo_sqlsrv_53_ts_vc9.dll
  76.  
  77. extension=php_sqlsrv_52_nts_vc6.dll
  78. extension=php_sqlsrv_52_ts_vc6.dll
  79. extension=php_sqlsrv_53_nts_vc6.dll
  80. extension=php_sqlsrv_53_nts_vc9.dll
  81. extension=php_sqlsrv_53_ts_vc6.dll
  82. extension=php_sqlsrv_53_ts_vc9.dll


Ten post edytował PROGer 7.05.2015, 09:55:07
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
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 25.06.2025 - 19:03