Call to undefined function sqlsrv_connect() with WAMP

后端 未结 4 1438
余生分开走
余生分开走 2021-01-18 23:19

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 : Wam

4条回答
  •  别那么骄傲
    2021-01-18 23:42

    Detailed steps for SQL Server Lovers to Install and Configure PhP:

    1. Install Wamp wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe
    2. Configure PhP a. Update conf file Thumbrules are i. Change Port ii. Change from Deny to Granted iii. Change from None to Allow iii. Change the order from Deny, Allow to Allow, Deny

      C:\wamp\bin\apache\apache2.4.9\conf\httpd.conf
      Line # 62, 63
      Listen 127.0.0.1:8201
      Listen [::0]:8201
      
      Line # 240
      
          AllowOverride all
          #Require all granted
          Order allow,deny
          Allow from all
      
      
      Line #274
      AllowOverride all
      
      Line #282
          Order allow,deny
          Allow from all
      Line #299
      Require all granted
      

      b. If Wamp is running, exit and restart c. type http://localhost:8201/ in browser, to get wamp home page d. place any sample html page in c:\wamp\www folder http://localhost:8201/pagename.html

    3. SSSP, create a Directory - project name, keep .zip file, config.xml, sssp_config.xml, widgets.ino files in this folder http://hostname:8201/DirectoryName in URL Launcher to install Widgets in SSSP TV Read SSSP Configuration file for more details on SSSP
    4. SQL Server Configuration Current Configuration WampServer 2.5 32bits [64 bits success story for SQL Server is less] PHP 5.5.12 Apache 2.4.9

      Steps:
      
      a. Download Microsoft Driver SQLSRV32.exe from https://www.microsoft.com/en-us/download/details.aspx?id=20098. 
      b. Extract the files from the .exe downloaded on my temp folder
      c. Copy php_sqlsrv_55_ts.dll and php_pdo_sqlsrv_55_ts.dll into C:\wamp\bin\php\php5.5.12\ext folder
      d. Or Copy dlls from DLL folder to C:\wamp\bin\php\php5.5.12\ext folder
      e. Edit C:\wamp\bin\php\php5.5.12\php.ini add
          extension=php_pdo_sqlsrv_55_ts.dll
          extension=php_sqlsrv_55_ts.dll
      f. Edit C:\wamp\bin\apache\apache2.4.9\bin\php.ini add 
          extension=php_pdo_sqlsrv_55_ts.dll
          extension=php_sqlsrv_55_ts.dll
      g. Install Microsoft® ODBC Driver 11 64 bit or 32 bit as per your OS. My OS is 64 bit. The ODBC drivers can be found @ https://www.microsoft.com/en-us/download/details.aspx?id=36434 or in the folder ODBC
          And newer drivers can be found @ https://www.microsoft.com/en-us/download/details.aspx?id=20098
      e. Restart all services / Restart computer
      f. Place Sample php files in c:\wamp\www\TestWeb folder and browse http://localhost:8201/TestWeb/page.php
      g. Change host name, db name, uid and pwd as per your SQL server credentials
      

提交回复
热议问题