We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,695 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

How to connect php with Sql Server 2005

Hi friends...
I am using Wamp with PHP 5.3 and want to connect with SQL Server 2005 but not successful. I also tried it with PHP 5.2.8 but it still not working.
I google it and found some solutions but not successsful yet.
Can anyone give me detailed guide (step by step) that how i can connect PHP with Sql Server 2005???
Thanks in advance...

2
Contributors
2
Replies
19 Hours
Discussion Span
1 Year Ago
Last Updated
4
Views
ankit.pandey3
Junior Poster in Training
68 posts since Nov 2010
Reputation Points: 2
Solved Threads: 0
Skill Endorsements: 0

Have you enabled the mssql extension in the php.ini ? In wamp it is disabled by default.

pritaeas
Posting Prodigy
Moderator
9,265 posts since Jul 2006
Reputation Points: 1,173
Solved Threads: 1,456
Skill Endorsements: 86

Have you enabled the mssql extension in the php.ini ? In wamp it is disabled by default.

I already did following things:0

. Settings related to your php.ini file:

a) search the variable mssql.secure_connection in your php.ini file and put it to on mode if its off
b) remove comment from the dll extention php_mssql.dll (i.e. remove the ; from the front of the extention )

2. Settings related to the dll files.

download a file name ntwdblib.dll from the internet. you can download it from here or can search on internet for that. copy the downloaded dll to the apache/bin directory and for IIS copy it to the php extention directory (if path not known can be found in php.ini for variable extension_dir)

also you need to have your php_mssql.dll in your php extension directory. if its not present please download it and copy it to the default php extension directory.

3. restart all your services (i.e. php and apache or iis) and you can use the script given below to connect to your SQL Server.

ankit.pandey3
Junior Poster in Training
68 posts since Nov 2010
Reputation Points: 2
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0578 seconds using 2.65MB