php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29434 Unable to connect to SQL server2000
Submitted: 2004-07-28 21:06 UTC Modified: 2004-07-29 19:21 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: rjahanzeb at computer dot org Assigned:
Status: Closed Package: MSSQL related
PHP Version: 4.3.7 OS: win2k
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rjahanzeb at computer dot org
New email:
PHP Version: OS:

 

 [2004-07-28 21:06 UTC] rjahanzeb at computer dot org
Description:
------------
I am unable to connect to SQL Server 2000 from the server which has SSL Certificate installed via PHP. I can connect to the same database using JSP from the same server. 

I have made following changes to default php.ini
-uncomment the mssql.dll extension
-change the extension_dir
-and set register_global to on.

Is there an issue with PHP connecting to SQL Server over SSL?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-28 21:36 UTC] fmk@php.net
Please provide more information about your setup and the error/warning messages you are getting.

The PHP extension uses the TDS protocol on port 1433 or netbios over TCP/IP  to communicate with the server.
 [2004-07-28 22:09 UTC] rjahanzeb at computer dot org
I have two development servers one that runs PHP (and JSP) and one that runs MSSQL Server. 
I have two production servers, one that runs PHP (and JSP) and one that runs MSSQL Server cluster.

The development PHP server can successfully connect to the development MSSQL server with both PHP and JSP.

The production PHP server can successfully connect to the development MSSQL server with both PHP and JSP.

The production PHP server can successfully connect to the production MSSQL server using JSP but not PHP.

In all cases the database username, password and database connection details are the same. The php.ini files are the same on the development and production PHP servers.


Webserver on production server has SSL.

Error I get is "Warning: mssql_connect(): Unable to connect to server: (servername)"

Note two things are different. One of the database server is a cluster and one of the production server has SSL.
 [2004-07-29 07:11 UTC] fmk@php.net
The SSL on the web server does not change anything with respect to the communication between the two servers. That's between the web server and the browser.

Can you connect from the production php server using Query Analizer? This should be your first test. It sounds like a configuration problem. You should use 'Client Network Utility' to specify host and server configurations. If the server name you are using is unresolved it will not be possible to do a connection.
 [2004-07-29 17:07 UTC] rjahanzeb at computer dot org
Yes, I installed the SSL on the development server and it seems that it still works fine.
I do not have "Client Network Utility" installed on the production server. I didn't think a need to do that since my development server doesn't have it and it seems to be working fine. I tried to telnet to the database on 1433 to make sure there is no problem there. Also, I can connect to the database using JSP from the same webserver. 
I know for sure my development server doesn't have SQL Client, is there a dll something that gets install? I can look up to make sure if development server has that.

Thank you for your help.
 [2004-07-29 19:21 UTC] rjahanzeb at computer dot org
You can close this issue. I ran cliconfg.exe and I found out that there was no default network library set. I set up the default to TCP/IP and added the SQL Server's name with port. It worked after that.
I am not sure how my development server doesn't have this configuration and it still works. 
Also, I am not sure how this exe file got on the production server since I never installed the SQL Client. 
But thank you for your help.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon May 23 08:05:45 2022 UTC