Home >Backend Development >PHP Tutorial >php Sql Server connection failure problem and solution_PHP tutorial
1. Confirm that the database service is open
2. Open the extension in the php.ini configuration
3. Check the database-related version
(1) At this time, Sql2000 needs to check the php directory and the apache bin directory. Whether the version of the ntwdblib.dll file is consistent, right-click ntwdblib.dll and look at the file properties to see the version. The ntwdblib.dll corresponding to Sql2000 should be version 7.0
(2) The ntwdblib.dll corresponding to Sql2005 is version 8.0.
If the version is incorrect, the link may fail, just check carefully.
I encountered a problem when linking to sql2005. After careful investigation and search, I found a solution. I hope it will be useful to everyone.
Attachment: Two versions of the ntwdblib.dll file. After downloading, remove the number in the name and change it to ntwdblib.dll and place it in the corresponding directory.
File packaging