php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22287 mssql_connect always returns 'Unable to connect to server'
Submitted: 2003-02-18 21:44 UTC Modified: 2003-02-18 22:38 UTC
From: lidiexy at fim dot uclv dot edu dot cu Assigned:
Status: Not a bug Package: MSSQL related
PHP Version: 4.2.3 OS: WindowsXP Pro
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lidiexy at fim dot uclv dot edu dot cu
New email:
PHP Version: OS:

 

 [2003-02-18 21:44 UTC] lidiexy at fim dot uclv dot edu dot cu
When I try to run this script:
<?php
  mssql_connect('mssql.localserver', 'myuser', 'mypass') or die('Nope');
?>

I always get a warning saying that it was unable to connect to server, and the Nope message. I also tested with my mssql IP instead of the dns.

My web server: Apache 2.0 PHP Filter 4.2.3. WinXP Pro.
My MSSQL 2000 over Windows 2000 Advanced Server.

In the webserver I run the Query Analizer against my mssql and it works. The myuser user is a mssql's one.

Any ideas?
Lidiexy.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-18 22:38 UTC] fmk@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

There could be two resons for this:

1) The server you are contacting could not be found. 'mssql.localserver' is not a valid server name. The server name can be a netbeui name, a tcp/ip address or host name or an alias configured with the client network utility.

2) The SQL server is configured to allow trusted connections only. You can either reconfigure the SQL server or use the php.ini option mssql.secure_connection = On. You will have to make sure the user running the Apache process is a trusted user.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC