Jump to content
xisto Community
vhortex

Ms Sql Server 2008 With Php (expanded) *NOTE to reviewers.. while typing the tutorial, my browser suddenly re

Recommended Posts

NOTE FOR THE READERS:

There is a same webpost that exist on my site http://forums.xisto.com/no_longer_exists/, some modifications have been added for simplicity. A base article which I read a few weeks ago existed made by "David Lauzon" blog site with a name "Dave's Laptop" created around 2008/2009 from http://www.davidlauzon.net/.

 

*NOTE to reviewers.. while typing the tutorial, my browser suddenly reloads. if this was submitted twice, please remove the first one.

 

 

Requirements

 

Windows Vista, Windows 7 or Win XP

.Net Framework 3.5 SP1

Windows Installer 4.5

Windows PowerShell 1.0

MS Core XML Services (MSXML) 6.0

MSSQL SP1 (Windows 7)

NOTE FOR THE READERS:

In order to download windows Power Shell, you need to pass the genuine windows checking. You can still google for alternative download locations preventing the need for the checking. Power Shell also comes preinstalled from windows 7 including .Net framework 3.5 but it wont eliminate the need to download the service pack.

 

This assumes that you already have a running apache and php on your target computer, all services must be turned off that uses port 80 and it includes SQLServers error reporting services (this one binds as system and uses port 80) also turn off IIS.

.

Setup SQL Server

 

Download and install MS SQL Server Express 2008 with Advanced Services and choose the following options:

 

Single instance Install (not clustered !)

Name the instance "SQLExpress" if you are using SQL Express or MSSQLSERVER if you are using the developer version

In the options box choose "SQL Server", and "Management Studio" (do not install full-text search, as it requires clustering)

Set the Server Service Account Name to "NT AUTHORITY\NETWORK SERVICE", auto

Set the SQL Server Browser to "NT AUTHORITY\NETWORK SERVICE", manual

Choose mixed mode authentication

Set SQL Server to listen on TCP port.

Start "SQL Server Configuration Manager"

Network Configuration -> Protocols : enable "Named Pipes" and "TCP/IP"

Right-click "TCP/IP" -> Listen All = Yes"

In tab "IP addresses" -> Section IPAll -> TCP Dynamic Ports = 1433

Repeat these steps for SQL Native Client.

Restart SQL Server

Create your database and set the owner to user 'sa', and change the user sa password.


NOTE FOR THE READERS:If you have an MSDN account, you can download SQLServer 2008 developer, this SQLServer have all the features of enterprise edition and only differ on licensing. You can also google for a store that sells the DVD for $47-$50. MSDN account subscription cost around $50 and if you only plan to get the DVD I recommend that you buy a DVD copy from google store.

 

The username 'sa' is only used as an example, my actual database uses the name metalbender as the user, the important part here is to take note that you won't install cluster support and fulltext as this will cause your server to run on clusters which will cause problems on connectivity.

 

Setting up PHP and Apache

 

This assumes you have wamp installed, otherwise just change the path.

 

Download the good version of ntwdblib.dll (2000.80.194.0) from http://webzila.com/

Overwrite C:\wamp\bin\apache\apache2.2.8\bin\ntwdblib.dll

Overwrite C:\wamp\bin\php\php5.2.6\ntwdblib.dll

Enable php_mssql.dll in php.ini

extension=php_mssql.dll
Restart Apache and test using the code below

$server = 'BANGKOK\SQLEXPRESS';  // The format is "HOST\SERVERNAME[,PORT] and an IP address is also applicable, use what you entered on the SQL Installation section"	 $username = 'sa'; // use what you entered on the SQL Installation section"	 mssql_connect($server, $username, $password);
NOTE FOR THE READERS: WAMP was used as an example but it is not required to use that. It was favored than the rest due to ease of use. WAMP supports multiple apache core, PHP and MySQL installation and you can swap any of them by a menu click (no conf editing. You can also enable services by menu clicks and view the php.ini and error log by a menu click. Be informed that WAMP is NOT a requirement and any combination of Apache and PHP will work as long as you change the config and replaced the dll file from the corresponding directories.

 

This also includes a compilation of Apache and PHP on another server/computer.


Edited by yordan
Qutoed the copied text (see edit history)

Share this post


Link to post
Share on other sites

Please do not forget to quote the text you already posted at http://forums.xisto.com/no_longer_exists/
Please remember that posts copied from somewhere else are not welcome here. Even if you are the author of the text, you must post it at asta first, and on the other sites you quote the text mentioning it's original at Xisto. Or quote the text at Xisto.
But you cannot have the same text on two different places on the web.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.