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

x
?
Solved

mssql_connect function undefined error

Posted on 2003-10-29
7
Medium Priority
?
215 Views
Last Modified: 2013-12-12
This is my first time trying to use sql server with php.  I have always worked with mysql and php and never had any problems with database connectivity.   The function for mssql do not seem to exist in my installation of php.  Is there some settings I have to change to have them work properly.  I am runnint this on a windows 2000 machine with apache.  again a first for me since I have always run apache and php under linux.   So I'm not sure if I have missed some step but I can't use the mssql function for some reason. Does anyone know how I can solve this issue.

Kelly
0
Comment
Question by:unreal400
  • 2
4 Comments
 
LVL 2

Author Comment

by:unreal400
ID: 9645334
I have got it to find the functions now but it still will not connect to the database.

I am useing   mssql_connect("10.10.10.101:1433","user","pass");
but I get an unable to connect message.  any idea on what might be preventing me access.
I am using apache on a windows 2000 server machine.
The database is SQL server 2000 and is on a different machine but has the ports open and the database is running because I have several other programs accesing it.

If anyone has any idea's let me know.

Kelly
0
 

Expert Comment

by:tetminal
ID: 9647711
hey, try using

mysql_connect("10.10.10.101:1433","user","pass");

mysql_connect("10.10.10.101","user","pass");

or just
mysql_connect("localhost","user","pass");

give it a try.. i think something like this happend to me at first too.. :)
0
 
LVL 33

Accepted Solution

by:
snoyes_jw earned 240 total points
ID: 9660989
try using a comma instead of a colon to specify the port, like this:

mssql_connect("10.10.10.101,1433","user","pass");
0
 
LVL 33

Expert Comment

by:snoyes_jw
ID: 10106903
It's been a while since the last post.  Is the problem solved?
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month18 days, 2 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