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.

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!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.