Solved

mssql_connect function undefined error

Posted on 2003-10-29
7
175 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
7 Comments
 
LVL 2

Author Comment

by:unreal400
Comment Utility
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
Comment Utility
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 60 total points
Comment Utility
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
Comment Utility
It's been a while since the last post.  Is the problem solved?
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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.

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now