Ad:
 
  • PHP Discussion Thread
  • Unsolved
  • Views: 70
  • PHP RSS
Similar Threads
Jul 28th, 2010
0

php with mssql connection problem

Expand Post »
Hello everybody,

I'm having the same problem.
I can connect to a SQL server with default instance (no named), but can't connect to a named instance!
I tried escaping backslashes, and putting port number, with no success.

Examples:
$connection = mssql_connect('MYSERVER', 'USER', 'PWD'); --> WORKS OK
$connection = mssql_connect('MYSERVER\INSTANCE', 'USER', 'PWD'); --> FAILS
$connection = mssql_connect('MYSERVER\\INSTANCE', 'USER', 'PWD'); --> FAILS
$connection = mssql_connect('MYSERVER,XXXX', 'USER', 'PWD'); --> FAILS (XXXX=PORT NO)

I'm working with MSSQL 2000, Apache and PHP 5.1.4. The Apache and PHP are in the same server. The SQL Server is in another server.

Thanks for any help.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pgperez is offline Offline
2 posts
since Jul 2010
Jul 29th, 2010
0

Re: php with mssql connection problem

http://php.net/manual/en/function.mssql-connect.php

They given how to connect with a named instance
Reputation Points: 153
Solved Threads: 229
Nearly a Posting Virtuoso
rajarajan07 is offline Offline
1,398 posts
since May 2008
Jul 29th, 2010
0

Re: php with mssql connection problem

I followed all the instructions posted in php.net, both the official one, and the others proposed by users, but no one worked.
Currently, our applications are working correctly in production environment, but the SQL Server in production has NO named instance, it works with the default instance.
Now we're configuring a new instance (named), and I can't connect to it!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pgperez is offline Offline
2 posts
since Jul 2010
Message:
Previous Thread in PHP Forum Timeline: syntax error, unexpected $end please help :(
Next Thread in PHP Forum Timeline: how to find name and mobile number from a string





About Us | Contact Us | Advertise | Acceptable Use Policy
Build Custom RSS Feed


Follow us on Twitter


© 2010 DaniWeb® LLC