[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

PHP connect with MsSQL

Posted on 2005-05-08
5
Medium Priority
?
399 Views
Last Modified: 2008-02-07
Dear all experts,

i'm using mssql_connect to connect to MsSQL like that
mssql_connect(ipaddress,username,password);

however, it appeared an error msg "Fatal error: Call to undefined function: mssql_connect() in ....... .."

i dunno why ?! .. and cannot found the solution!
i jz want to connect remote msSQL to retrieve some data from there!
please help me and give me some example or reference site!

Thank you very much!
0
Comment
Question by:kankan
  • 2
4 Comments
 
LVL 10

Accepted Solution

by:
mensuck earned 400 total points
ID: 13956715
Hi




Did you setup (uncomment) your mssql extension in your PHP.INI file...

change this....

;extension=php_mssql.dll

to this....

extension=php_mssql.dll

Did you install 'ntwdblib.dll' into your system directory! c:/winnt or c:/windows

After doing this make sure shut down your server, if using IIS shutdown restart Internet Services


Suzanne
0
 

Author Comment

by:kankan
ID: 13956736
hi Suzanne,

then if i use odbc one will be better ?
coz i don't want to install anything in the Linux to avoid missing dll during setup the second server!
but i try to use odbc function as well, it has some problem raise up!
so, duuno what's wrong!

Thanks!
0
 

Author Comment

by:kankan
ID: 13956748
when using odbc_connect(), the error as below :
"Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Data source name not found, and no default driver specified, SQL state IM002 in SQLConnect in ................
[unixODBC][Driver Manager]Data source name not found, and no default driver specified"

Please give me some hints to solve it!

Thanks
0
 
LVL 14

Expert Comment

by:huji
ID: 16214005
No comment has been added to this question in more than 21 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: mensuck

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

Huji
EE Cleanup Volunteer
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses
Course of the Month18 days, 6 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question