473,395 Members | 1,791 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,395 software developers and data experts.

{SOLVED} How to access Sql Server using Apache on a windows machine?

Hello all, first I want to say that I have been developing in PHP using MySql, but now I want to do it using Sql Server, so I have downloaded and installed Sql Server Express 2005.
I have read a lot about how should make a connection, but still I cannot make it work. I am using PHP 5.0.4 and Apache 1.3.3 on windows XP SP2.
This is what I have tried to do:
[PHP]
$myServer = "localhost,1031";
$myUser = "sa";
$myPass = "e********";
$myDB = "Northwind";
$s = @mssql_connect($myServer, $myUser, $myPass)
or die("Unable to connect to SQL Server on $myServer");
[/PHP]
but it does not work, I always get the message about being Unable to connect to SQL Server on localhost,1031
The 1031 is the port that I have specified, I have made telnet localhost 1031 and it seems to work, but why is not my script working?
Thanks for any help

Martin
Nov 14 '06 #1
1 1777
Hello, I want to reply myself to let you all know how I solved what was happening. I had to download the latest version of ntwdblib.dll, the version that comes with PHP is not the last one, and it does not work properly.

Martin
Nov 14 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
3
by: CJM | last post by:
I have a intranet-based system running IIS5/6. We have a secure logon feature whereby certain users can access restricted content. While most of this is ASP pages, and thus we can control that,...
10
by: callmebill | last post by:
I'm getting my feet wet with making Python talk to MySQL via ODBC. I started on Windows, and it went smoothly enough due to the ODBC stuff that apparently is native to Python at least on windows...
4
by: SJ Mo2 | last post by:
I have several Access databases that I want to publish (or make available) through our web-pages. The problem...our web server is on a Linux-Apache machine while our Access db is obviously on a...
21
by: Madingo | last post by:
I have been using Access 2003 for about a year and I am trying to find out how to create a web test environment to try and transition some of my Access applications on to the web. My stumbling...
3
by: Sidu | last post by:
Ok well i'm still very new to apache, mysql, and php.. let me explain everything i have set up.. I have installed Appserv, for those of you who are unfamiliar with it.. it installs mysql, php,...
3
by: sgottenyc | last post by:
Hello, Has anyone had any success running SQL Server Express on Vista with Apache via PHP? My PHP works fine, Apache works fine, and SQL Server Express works fine in Management Studio, but I...
8
by: ajos | last post by:
hi frnds, im trying to convert my servlets database configuration from ms access to mysql database.however im getting some error like no driver found exception. to verify this error ive...
1
Claus Mygind
by: Claus Mygind | last post by:
I am using Apache 2.2.11 on a Windows Server 2003. I have managed to get Apache installed. But I am stuck on one small issue having to do with rights on the 2003 server. In one part of my app...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.