473,383 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Connection problem with MS-SQL-server

Hello,

I use an Apache-Web-Server 1.3 with PHP 5 under Windows 2000. With a
PHP-script I want to get data from a MS-SQL-Server.
Therefore is within my php.ini:

extension=php_mssql.dll

Within my PHP-script the first relevant line is:

$conn=mssql_connect("mySqlServerName", "myUserID", "myPassword");
if (! $conn) Die("Error opening database: ".mssql_get_last_message());
I want to work with 2 SQL-servers.

With the first one (version unknown) the connection succeed and I can get
data.

With the other (MS-SQL-Server 2000) I get an error trying to connect to the
SQL-Server:

Warning: mssql_connect(): Unable to connect to server: mySqlServerName

The same script runs on another web-Server without any problem and can get
data from both SQL-Servers. I can also get data from both SQL-Server from
my machine using other tools (i.e. a Java-applikation). So the error must
be caused by PHP, ini-files, DLLs, ... on my machine.

With some tools I have recognized, that in case of a successful
MS-SQL-connection, the client (in my case the PHP-interpreter) opens a
socket connection on port 1433 to the SQL-server. In my case such a socket
connection is not opened.

Somebody has an idea, what I can do ?

Georg Gerber

Jul 16 '05 #1
2 8887
Hi Joshua!
On Thu, 31 Jul 2003 17:45:31 -0400, Joshua Ghiloni
<jd***@SPAM.ME.AND.DIE.cwru.edu> wrote:
With the other (MS-SQL-Server 2000) I get an error trying to connect to the
SQL-Server:

Warning: mssql_connect(): Unable to connect to server: mySqlServerName


I might be off-base here, since the last time I tried this was in 2001,
but I remember that PHP's MS SQL support only went up to the version
just prior to MS SQL Server 2000 (6.5 or 7 maybe?). I'd be willing to
wager that that is your problem.


I think this is a limitation of the FreeTDS connection, if you're
connecting from Linux and also solved now.

HTH, Jochen

--
Jochen Daum - CANS Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/
Jul 16 '05 #2
> PHP's MS SQL support only went up to the version
just prior to MS SQL Server 2000 (6.5 or 7 maybe?).


thank you.

Running my script on another server succeed to connect to the SQL Server
2000. The difference is: on my server is an Apache on the other an IIS;
but PHP 5 is the same. So I think, this cannot be the problem.

Jul 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Gram | last post by:
Hello, Can anyone point me to a connection string for ASP to connect to an MS Access database using a username and password? Thanks in advance. Gram
1
by: Zlatko Matić | last post by:
Hi! In MS Access/PostgreSQL combination I have login form. After user writes all neccessary inputs and push the button, a startup procedure creates DSN-less connection string, receates all linked...
4
by: Eifel-benz | last post by:
How to get connection to a MS Access database? How to read from a MS Access database? How to close the connection to a MS Access database?
7
by: Tumurbaatar S. | last post by:
Is it so important to close database connections? As I understand, after processing a request and sending a response, page object destroyed. So all used connections also destroyed. Yes?
3
by: Greg Strong | last post by:
Hello All, Is there any way to close an ODBC connection via DSN without completely closing the Access front-end? I'm doing some testing with using Access as a front-end to Oracle 10g Express...
14
by: martin1 | last post by:
All, I want to check wether db connection/open or not, if not it will post db connection error to user in message box The code is like: Dim objConnection As New SqlConnection _...
1
by: fniles | last post by:
To do a connection pooling for MS Access using OleDBConnection, do I need to include OLE DB Services=-1 in the connection string ? What will the connection string be for connection pooling for MS...
7
by: fniles | last post by:
I am using VB.Net 2003 and MS Access (connecting using OleDBConnection). I read using DataAdapter and DataSet, not DataReader. When many people try to access the database at the same time, I get...
8
by: mark_aok | last post by:
Hi all, I have a split database. Both the forms, and the tables are stored on a shared network drive (this is Access 2003). The users use the forms, and the tables on the network drive, there...
1
by: raghulvarma | last post by:
I am not able to find "Data Source" when i give the connection for a MS Access plz tell me where I went wrong in thee below shown code snippet OleDbConnection connection = new OleDbConnection(); ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.