942,524 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 480
  • PHP RSS
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.
Similar Threads
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: 167
Solved Threads: 239
Nearly a Posting Virtuoso
rajarajan07 is offline Offline
1,445 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

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
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
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC