473,834 Members | 1,801 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP, Apache, SQL Server 2005 Express - on Vista

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 cannot connect via this call:

$myServer = "servername ";
$myUser = "username";
$myPass = "password";
$myDB = "myDB";

$conn = mssql_connect($ myServer, $myUser, $myPass)
or die("Couldn't connect to Server.");

mssql_select_db ($myDB, $conn)
or die("Couldn't connect to Server database.");

The error is "Couldn't connect to Server", so the first connection
statement fails.

The code works fine on a Windows XP machine with Apache as well as a
Windows Server 2003 running IIS, so I don't think that's the problem.
My Apache and PHP work fine on the Vista machine, since phpinfo()
outputs correctly. SQL Server Express works fine by itself as well -
it is the latest version of the software, downloaded quite recently,
so it works fine with Vista.
I have tried the following:
-Enabled TCP/IP, Named Pipes, VIA, and Shared Memory in SQL Server
Configuration Manager.
-Added my Windows account to the administrators in SQL Server Surface
Area Configuration.
-Tried "servername\sql express" and just "sqlexpress ", instead of
"servername ", in the above connection string.
-Tried turning on mssql.secure_co nnection in php.ini and then
connecting to port 1443.
-Tried placing php.ini in C:\windows and php_mssql.dll in C:\windows
\system32.
-I searched google for solutions. In addition to the above, one
suggestion was made that a file called ntwdblib.dll needs to be
upgraded. I believe this is an IIS specific file since I don't have
it on my system, so it shouldn't apply in my case.
Any ideas?
Suggestions in addition to the above are very much appreciated.
Thanks in advance,
Simon Gottesman

Apr 4 '07 #1
3 7971
hey, have you tried disabling the firewall and any security related to
this service? just asking since vista has it`s own ideas about what
should run and not and usually doesn`t ask you about it.

Apr 5 '07 #2
sgottenyc wrote:
Has anyone had any success running SQL Server Express on Vista with
Apache via PHP?
No, but I've done this on Linux. The code you posted looks fine. Turn on
all error reporting at the top of your file:

ini_set('displa y_errors', TRUE);
error_reporting (E_ALL);

and see what error messages you get. It's likely to be a problem with your
setup, not the code.
-I searched google for solutions. In addition to the above, one
suggestion was made that a file called ntwdblib.dll needs to be
upgraded. I believe this is an IIS specific file since I don't have
it on my system, so it shouldn't apply in my case.
You definitely need this file. See the "Requiremen ts" section on this
page:
http://uk.php.net/manual/en/ref.mssql.php

I don't think SQL Server Express includes this file, but it does come with
SQL Server 2000. It's probably also in SQL Server 2000 SP4, but that's
quite a big download. Ooh look... it seems someone's uploaded that file
here:

http://www.gigasize.com/get.php/1106430/ntwdblib.dll

I wonder who that was.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Apr 5 '07 #3
On Apr 5, 4:20 am, Toby A Inkster <usenet200...@t obyinkster.co.u k>
wrote:
sgottenyc wrote:
Has anyone had any success running SQL Server Express on Vista with
Apache via PHP?

No, but I've done this on Linux. The code you posted looks fine. Turn on
all error reporting at the top of your file:

ini_set('displa y_errors', TRUE);
error_reporting (E_ALL);

and see what error messages you get. It's likely to be a problem with your
setup, not the code.
-I searched google for solutions. In addition to the above, one
suggestion was made that a file called ntwdblib.dll needs to be
upgraded. I believe this is an IIS specific file since I don't have
it on my system, so it shouldn't apply in my case.

You definitely need this file. See the "Requiremen ts" section on this
page:
http://uk.php.net/manual/en/ref.mssql.php

I don't think SQL Server Express includes this file, but it does come with
SQL Server 2000. It's probably also in SQL Server 2000 SP4, but that's
quite a big download. Ooh look... it seems someone's uploaded that file
here:

http://www.gigasize.com/get.php/1106430/ntwdblib.dll

I wonder who that was.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Thanks Toby,
That did it - placing the downloaded ntwdblib.dll in C:\php and C:
\winnt\system32 did the trick!
(And here I was starting to consider downgrading to Windows XP
instead.)
Thanks again and take care,
Simon

Apr 5 '07 #4

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

Similar topics

4
3729
by: Patrick Masson | last post by:
Hello, Our configuration : Apache 2.0.53 PHP 5.0.4 PC Windows 2000 MATLAB 6.1 We work on a consulting project in France which involves MATLAB Web server,
1
6649
by: Peter | last post by:
I've purchased VS.NET 2005 Standard and have tried to install SQL Server 2005 Express, but get the following error in the error log. Please could someone help me.... Microsoft SQL Server 2005 Express Edition x86: Component Microsoft SQL Server 2005 Express Edition x86 returned an unexpected value. ***EndOfSession***? Microsoft SQL Server 2005 Express Edition x86: Component Microsoft SQL Server 2005 Express Edition x86 returned an...
2
2108
by: kress1963nov22 | last post by:
I recently purchased a good MS book ("Build a Web Site Now") by Jim Buyens. It has the Express Edition of MS-Visual Web Developer 2005 on CD and also MS SQL Server 2005 Express Edition on the CD. A couple of questions for this newbie: Can MS SQL Server 2005 Express Edition be used in place of the older MSDE product for backend database work? I also have Visual Studio .NET (VB) 2003 (Standard Edition). How compatible are all these products...
3
7423
by: ianforgroupuse | last post by:
I'm running Vista Business edition on 2005 Virtual PC. Installed SQL Server 2005 Express latest download, with instance of MSSQLSERVER and service accounts running under "NT AUTHORITY\SYSTEM". Mixed mode authentication specified and sa password specified. Used server manager to create user login with sysadmin role. Login using windows authentication. Run my application and database is created and populated with default records.
4
4104
by: Wolfgang Kraus | last post by:
Hi, i want to create a solution which shall consist of a sql server 2005 - data base (express edition if the following features are available by express edition) and a mobile windows application (running on a smartphone under windows mobile 5.0). The sql server shall be installed on a ordinary laptop using windows xp (not professionall edition).
4
2355
by: Preben Zacho | last post by:
Hi there The scenario I got is this: I have created a Windows application in VS and I want to deploy it to another machine running Windows Vista. Since I have no control over this other machine, I've set it up to run SQL Authentication and I have added a new user called "MyUser" and applied a password. This user/password is used in my connection string whick looks like this: Server=.\SQLEXPRESS;Database=MyDB;User...
0
1756
by: sebor | last post by:
October 29, 2007 -- The Apache C++ Standard Library project is pleased to announce that the official stdcxx 4.2.0 release is now available for download from the following location: http://people.apache.org/dist/incubator/stdcxx/releases/ For additional details see the stdcxx Download page: http://incubator.apache.org/stdcxx/download.html#releases The Apache C++ Standard Library is a full implementation of the C++ Standard Library...
2
2393
by: egress | last post by:
I've created an SQL Server Express database with one table that I use in my test envionement (Windows Vista). I'm developing an ASP.NET web app with VS 2005 and try to connect to the express server to retrieve some simple data (no not Membership data). My connection string is: <connectionStrings> <add name="MyTestDb" connectionString="Data Source=. \SQLExpress;Integrated DataDirectory|MyData.mdf;User Instance=true;"...
7
2102
by: Joe | last post by:
I added some ajax to my asp.net web site and will Ajax just doesn't seem to work. Does Any one PLEASE have any ideas on why Ajax doesn't work on Apache 2.2.6 w/asp.net 2.0
0
9799
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9649
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10799
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10515
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9338
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6960
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5629
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5799
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3084
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.