Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS SQL and php error

Status
Not open for further replies.

dagger2002

Programmer
Nov 23, 2004
172
US
Hey all i am having a problem. I have a script that needs to interface with a mssql db.

I am getting the following error.


Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: 163.150.38.28,1433 in /Library/WebServer/Documents/dev_sbcss/Charts/Gallery/EnrollmentMS.php on line 8
error:

my server is a mac running 10.4.9
php 5
sql 2005

thanks
 
can you connect manually to the db server and the port in question? it is quite possibly a plain tcp/ip issue.

 
I can connect to the server through other programs.

Webbrowser, ftp
 
Are you using a comma to separate the port # from the IP address? Is that proper? I've not seen that before.
 
sometimes you may need to specify the instance as well as the server. if you do then you use the comma notation. if not then the colon notation. You should also enable tcp/ip and named pipes for the sql server (or at least the first).

there is plenty of good advice on the manual page for mssql_connect.

 
I might be a little ignorant here but isn't that a MS only thing? Will that work on OSX?

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.
 
Did you check line 8 of that php script, maybe there's a typo.

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top