简体   繁体   中英

Call to undefined function sqlsrv_connect() with WAMP

I know that this question has already been asked several times on this website but I'm seriously starting to wonder wheter I'm crazy or not.

My configuration : WampServer 2.5 64bits (PHP 5.5.12, Apache 2.4.9)

My steps:

  1. Download Microsoft Driver SQLSRV32.exe from https://www.microsoft.com/en-us/download/details.aspx?id=20098
  2. Extract the files from the .exe downloaded on my desktop
  3. Copy php_sqlsrv_55_ts.dll and php_pdo_sqlsrv_55_ts.dll into C:\\wamp\\bin\\php\\php5.5.12\\ext
  4. Edit C:\\wamp\\bin\\php\\php5.5.12\\php.ini adding " extension=php_pdo_sqlsrv_55_ts.dll " and " extension=php_sqlsrv_55_ts.dll "
  5. Edit C:\\wamp\\bin\\apache\\apache2.4.9\\bin\\php.ini adding " extension=php_pdo_sqlsrv_55_ts.dll " and " extension=php_sqlsrv_55_ts.dll "
  6. Restart all services (I even tried to restart my computer, but nothing works)

I still get the error... So what am I missing to make this work ?

I know that this question has already been asked several times on this website but I'm seriously starting to wonder wheter I'm crazy or not.

My configuration : WampServer 2.5 64bits (PHP 5.5.12, Apache 2.4.9)

My steps:

  1. Download Microsoft Driver SQLSRV32.exe from https://www.microsoft.com/en-us/download/details.aspx?id=20098
  2. Extract the files from the .exe downloaded on my desktop
  3. Copy php_sqlsrv_55_ts.dll and php_pdo_sqlsrv_55_ts.dll into C:\\wamp\\bin\\php\\php5.5.12\\ext
  4. Edit C:\\wamp\\bin\\php\\php5.5.12\\php.ini adding " extension=php_pdo_sqlsrv_55_ts.dll " and " extension=php_sqlsrv_55_ts.dll "
  5. Edit C:\\wamp\\bin\\apache\\apache2.4.9\\bin\\php.ini adding " extension=php_pdo_sqlsrv_55_ts.dll " and " extension=php_sqlsrv_55_ts.dll "
  6. Restart all services (I even tried to restart my computer, but nothing works)

I still get the error... So what am I missing to make this work ?

I know that this question has already been asked several times on this website but I'm seriously starting to wonder wheter I'm crazy or not.

My configuration : WampServer 2.5 64bits (PHP 5.5.12, Apache 2.4.9)

My steps:

  1. Download Microsoft Driver SQLSRV32.exe from https://www.microsoft.com/en-us/download/details.aspx?id=20098
  2. Extract the files from the .exe downloaded on my desktop
  3. Copy php_sqlsrv_55_ts.dll and php_pdo_sqlsrv_55_ts.dll into C:\\wamp\\bin\\php\\php5.5.12\\ext
  4. Edit C:\\wamp\\bin\\php\\php5.5.12\\php.ini adding " extension=php_pdo_sqlsrv_55_ts.dll " and " extension=php_sqlsrv_55_ts.dll "
  5. Edit C:\\wamp\\bin\\apache\\apache2.4.9\\bin\\php.ini adding " extension=php_pdo_sqlsrv_55_ts.dll " and " extension=php_sqlsrv_55_ts.dll "
  6. Restart all services (I even tried to restart my computer, but nothing works)

I still get the error... So what am I missing to make this work ?

I know that this question has already been asked several times on this website but I'm seriously starting to wonder wheter I'm crazy or not.

My configuration : WampServer 2.5 64bits (PHP 5.5.12, Apache 2.4.9)

My steps:

  1. Download Microsoft Driver SQLSRV32.exe from https://www.microsoft.com/en-us/download/details.aspx?id=20098
  2. Extract the files from the .exe downloaded on my desktop
  3. Copy php_sqlsrv_55_ts.dll and php_pdo_sqlsrv_55_ts.dll into C:\\wamp\\bin\\php\\php5.5.12\\ext
  4. Edit C:\\wamp\\bin\\php\\php5.5.12\\php.ini adding " extension=php_pdo_sqlsrv_55_ts.dll " and " extension=php_sqlsrv_55_ts.dll "
  5. Edit C:\\wamp\\bin\\apache\\apache2.4.9\\bin\\php.ini adding " extension=php_pdo_sqlsrv_55_ts.dll " and " extension=php_sqlsrv_55_ts.dll "
  6. Restart all services (I even tried to restart my computer, but nothing works)

I still get the error... So what am I missing to make this work ?

I know that this question has already been asked several times on this website but I'm seriously starting to wonder wheter I'm crazy or not.

My configuration : WampServer 2.5 64bits (PHP 5.5.12, Apache 2.4.9)

My steps:

  1. Download Microsoft Driver SQLSRV32.exe from https://www.microsoft.com/en-us/download/details.aspx?id=20098
  2. Extract the files from the .exe downloaded on my desktop
  3. Copy php_sqlsrv_55_ts.dll and php_pdo_sqlsrv_55_ts.dll into C:\\wamp\\bin\\php\\php5.5.12\\ext
  4. Edit C:\\wamp\\bin\\php\\php5.5.12\\php.ini adding " extension=php_pdo_sqlsrv_55_ts.dll " and " extension=php_sqlsrv_55_ts.dll "
  5. Edit C:\\wamp\\bin\\apache\\apache2.4.9\\bin\\php.ini adding " extension=php_pdo_sqlsrv_55_ts.dll " and " extension=php_sqlsrv_55_ts.dll "
  6. Restart all services (I even tried to restart my computer, but nothing works)

I still get the error... So what am I missing to make this work ?

I know that this question has already been asked several times on this website but I'm seriously starting to wonder wheter I'm crazy or not.

My configuration : WampServer 2.5 64bits (PHP 5.5.12, Apache 2.4.9)

My steps:

  1. Download Microsoft Driver SQLSRV32.exe from https://www.microsoft.com/en-us/download/details.aspx?id=20098
  2. Extract the files from the .exe downloaded on my desktop
  3. Copy php_sqlsrv_55_ts.dll and php_pdo_sqlsrv_55_ts.dll into C:\\wamp\\bin\\php\\php5.5.12\\ext
  4. Edit C:\\wamp\\bin\\php\\php5.5.12\\php.ini adding " extension=php_pdo_sqlsrv_55_ts.dll " and " extension=php_sqlsrv_55_ts.dll "
  5. Edit C:\\wamp\\bin\\apache\\apache2.4.9\\bin\\php.ini adding " extension=php_pdo_sqlsrv_55_ts.dll " and " extension=php_sqlsrv_55_ts.dll "
  6. Restart all services (I even tried to restart my computer, but nothing works)

I still get the error... So what am I missing to make this work ?

它适用于 64 位或 32 位,只需为您的操作系统下载正确的 dll 文件并更新您的 php.ini 文件。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM