Jump to content



Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!

Toggle shoutbox Shoutbox Open the Shoutbox in a popup

@  agyat : (24 May 2013 - 05:15 PM) O Dear, Where Are You? Without Your Words This Sb Is ..
@  agyat : (23 May 2013 - 01:23 AM) Wow! Mr. Sb Back Home.
@  OpaQue : (23 May 2013 - 12:44 AM) Ting
@  OpaQue : (24 April 2013 - 02:44 PM) I guess, Time to run Mycent script.
@  OpaQue : (24 April 2013 - 02:43 PM) wow.. not much spam. except habatt posting lot of links.. :P
@  yordan : (23 April 2013 - 01:04 PM) You're welcome, agyat. Nice to have been helpful. Second lesson: try full words, "you" instead of "EW".
@  agyat : (23 April 2013 - 05:03 AM) @YORDAN: tHANK EW FOR YOUR FIRST LESSON.   :D
@  yordan : (22 April 2013 - 09:43 PM) @agyat : "why don't you help me", or "please help me", or "please teach us"
@  yordan : (22 April 2013 - 09:42 PM) welcome back, velma
@  velma : (22 April 2013 - 07:51 AM) **yawns** Good to be back, wonder what is going on here :)
@  agyat : (22 April 2013 - 03:50 AM) Oh! so, why don't help me learn english..
@  yordan : (21 April 2013 - 08:38 PM) The goal mentioned by shiu : "learning english, learning computer"
@  agyat : (21 April 2013 - 06:31 PM) WHAT GOAL?
@  yordan : (20 April 2013 - 10:39 AM) yes, that's our goal. simultaneouly learning English and teaching/learning computer using.
@  shiyu : (20 April 2013 - 07:30 AM) learning english,learning computer
@  yordan : (19 April 2013 - 01:11 PM) Oh, I see, it's just a trick in order to force people looking at your texte. Somehow smart, maybe.
@  agyat : (19 April 2013 - 02:54 AM) And of course I know it is not SEO friendly.
@  agyat : (19 April 2013 - 02:52 AM) There may be two possible answers for that ....


1) Shout was posted using mobile keypad.

2) To force people read content carefully and/or with more concentration.
@  agyat : (19 April 2013 - 02:49 AM) There may be two possible answers for that ....
@  yordan : (18 April 2013 - 09:35 PM) however, why this mixing of capital letters in the middle of your text?

Replying to Ms Sql Server 2008 With Php (expanded)


Post Options

    • Can't make it out? Click here to generate a new image

  or Cancel


Topic Summary

yordan

Posted 05 August 2010 - 07:11 PM

Please do not forget to quote the text you already posted at http://www.vhortex.com/
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 astahost. Or quote the text at astahost.
But you cannot have the same text on two different places on the web.

vhortex

Posted 04 August 2010 - 10:00 PM

NOTE FOR THE READERS:
There is a same webpost that exist on my site http://www.vhortex.com, 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 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.

Review the complete topic (launches new window)