Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
🔒 NordVPN Premium – 3 Months
hrdilshan
Updated:
Thursday at 8:29 PM
🚀 Microsoft Office 365 Pro Plus – Lifetime Access! 🚀
hrdilshan
Updated:
Thursday at 8:28 PM
Linkedin Premium Business / Careere /Sales Navigator - 1/2/3/6/9/12 Months - Reddem Link
hrdilshan
Updated:
Thursday at 8:27 PM
Colombo
YEYE 3 in 1 Instant Coffee Mix 50 Sachet
Romeshka
Updated:
Wednesday at 12:16 AM
Colombo
Red Hat Certified System Administrator (RHCSA) - RHEL 10
Sanjeewani95
Updated:
Jul 3, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Help
Ane Hel me
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="DJ.ROCKSTAR" data-source="post: 3170581" data-attributes="member: 108570"><p><strong>TUTORIAL: How to install PHP and MySQL on IIS</strong></p><p></p><p></p><p> With the apparent increase of interest in individuals desiring to install PHP and MySQL on computers running Windows operating systems, I thought it would be beneficial to provide a set of instructions to help make this process as easy as possible. In this article, I’ll be providing some basics of IIS installation and then move to the installation of PHP and MySQL. </p><p></p><p>Some essentials you will need to get started:</p><p>IIS (preferably IIS 5 or IIS 6)</p><p>The PHP windows installer file </p><p>The PHP binaries file</p><p>The MySQL Windows installation file</p><p>(links will be provided for the downloads shortly).</p><p></p><p>Optional:</p><p>phpMyAdmin</p><p>MySQL Administrator </p><p></p><p>Let’s get started. Since you are installing on a Windows computer, you will most likely be using IIS for a web server, however, it is not required. You must have some web server running however, and you are quite welcome to use Apache or another web server of your choice, however, since that falls outside the scope of this tutorial we will leave that discussion for another day.</p><p></p><p>Some things to know about IIS. IIS v5.1 is included with Windows 2000 Professional, and Windows XP Professional, but is not installed by default. (*note – IIS 5.1 is not included with XP Home edition and is not available as a stand alone download from Microsoft. If you are an XP Home user, you will need to look for an alternative web server solution.) Windows 2000 server includes IIS 5.1, and Windows 2003 server includes IIS 6.</p><p></p><p>If you haven’t already done so begin by installing IIS. To do this go to Control Panel | Add/Remove Programs | Add/Remove Windows Components. In the dialogue box that comes up, check the option for Internet Information Services(IIS) and click the “Details” button. Select any additional features that would like to have installed and click OK. Click OK again to begin the installation. This will install IIS and start the web server service automatically. You should not need to reboot. To test your installation open your web browser and type in <a href="http://localhost/" target="_blank">http://localhost/</a> . This should bring up the default IIS page. If it does, your installation was a success and you can immediately get started on installing PHP. </p><p></p><p>It really shouldn’t matter whether you install PHP first or MySQL first. I’ve simply gotten into the habit of beginning with PHP, so that will be my next step. To get the files you will need, go to the download page at <a href="http://www.php.net/downloads.php" target="_blank">php.net</a> . The most current release available for download at the time of this writing is 5.1.1. This release has worked just fine for me, so it’s the one I use. You will want to download both the PHP 5.1.1 zip package AND the PHP 5.1.1 installer. Unzip both files to a temporary location and run the setup installer. This will install PHP automatically. The default installation directory is C:\PHP and I would suggest to leave it at that, unless there is a specific reason you need to install it elsewhere. *note it is not recommended to install PHP in a directory that contains spaces such as c:\Program Files\PHP as it can cause some web servers to crash. Answer the questions as they are presented by the wizard. I recommend choosing the option to add PHP to the Windows PATH environment variable when that option is presented. If not you can manually add it later, but you really should include it. For a good article on Windows environment variables <a href="http://vlaurie.com/computers2/Articles/environment.htm" target="_blank">go here</a> . When the installer completes you will have a basic installation of PHP. This works just fine, but it is recommended to add the additional libraries found in the PHP 5.1.1 zip package. Simply copy those files into the C:\PHP directory. The following files in this package are already installed with your PHP and there is no need to copy them install.txt, license.txt, php.exe and php4ts.dll.</p><p></p><p>To test your PHP installation copy the following into a file and save it as info.php in c:\Inetpub\wwwroot\ . (wwwroot is Windows IIS default website folder. Any of your web files will always go in there)</p><p><a href="http://www.ozzu.com/#" target="_blank">Line number On/Off</a></p><p>Code: <a href="http://www.ozzu.com/#" target="_blank">Select all</a></p><ol> <li data-xf-list-type="ol"><span style="font-family: 'monospace'"><?php phpinfo(); ?></span></li> </ol><p></p><p></p><p></p><p>Then go to your web browser and type: <a href="http://localhost/info.php" target="_blank">http://localhost/info.php</a> . If your installation was successful, this should display your PHP configuration information.</p><p></p><p>Now we can proceed to installing MySQL. Go to the MySQL <a href="http://dev.mysql.com/downloads/mysql/5.0.html" target="_blank">download page here.</a> . As of this writing the most current release is v5.0.16. Download the Windows(x86) file (the 33.6MB file). This is the full package and includes the installer. Unzip it to a temporary location and run the installer. For the most part, especially for someone doing this the first time, it’s easiest to use the standard installation. This will essentially configure all the basic things you need to have MySQL work. During the configuration you will be asked which port to use. The default port 3306 is usually fine, however if you know something else is already using that port, you can select another one. Your “super” user that will be created during the install is user “root”. Root is the chief administrative username and can do anything in MySQL. You can add other users later after you’re up and running, but root is going to be your main admin access. Remember the root password you use. If you lose or forget it, there is no way to access it, and you could find yourself unable to use MySQL. Complete the wizard. Now let’s test it to make sure it’s working. Go to Programs | MySQL | MySQL Server 5 | MySQL Command Line Client. This is a utility similar to DOS for managing MySQL. At the password prompt type in the password you entered and hit enter. If your server is working properly you should get something that looks like this:</p><p>Quote:</p><p> Enter password:</p><p>Welcome to the MySQL monitor. Commands end with ; or \g.</p><p>Your MySQL connection id is 1 to server version: 5.0.16-nt</p><p></p><p>Type 'help;' or '\h' for help. Type '\c' to clear the buffer.</p><p></p><p>mysql></p><p></p><p>If you see that, your installation was successful. You can type quit or exit to close the Client.</p><p></p><p>Now there are some purists out there that probably swear by that command line client and use it exclusively for managing their server. However, for us spoiled Windows dummies that are used to “easy-to-use” GUI’s there is an alternative good tool for your server management - MySQL Administrator which can be downloaded from <a href="http://dev.mysql.com/downloads/administrator/" target="_blank">HERE</a> . The installation is very straightforward. After it’s installed simply run it. For your logon the host would be localhost, the port would be the port you used when installing MySQL (default 3306) and the user would be root with the password you gave on installation. Since administering your MySQL server is beyond the scope of this article, we’ll leave that for another day, however, you’ll see very quickly the ease with which you can add users and create and manage your databases.</p><p></p><p>The last tool that I listed as optional, I actually couldn’t live without it, and that is phpMyAdmin which can be downloaded <a href="http://www.phpmyadmin.net/home_page/index.php" target="_blank">HERE</a> . Simply unzip the contents to a temporary directory. Create a folder called phpMyAdmin in c:\Inetpub\wwwroot\ and copy your extracted phpMyAdmin download files in there. Then open config.default.php in an editor and edit the following as needed.</p><p>Make sure the port number here $cfg['Servers'][$i]['port'] = '3306'; matches the port you used when installing MySQL. If you are going to only be using this as a development machine and it will not be connected to the internet or accessible from the internet use the following configuration for these three lines:</p><p><a href="http://www.ozzu.com/#" target="_blank">Line number On/Off</a></p><p>Code: <a href="http://www.ozzu.com/#" target="_blank">Select all</a></p><ol> <li data-xf-list-type="ol"><span style="font-family: 'monospace'"></span></li> <li data-xf-list-type="ol"><span style="font-family: 'monospace'">$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)?</span></li> <li data-xf-list-type="ol"><span style="font-family: 'monospace'">$cfg['Servers'][$i]['user'] = 'root'; // MySQL user</span></li> <li data-xf-list-type="ol"><span style="font-family: 'monospace'">$cfg['Servers'][$i]['password'] = 'yourpassword'; // MySQL password (only needed</span></li> <li data-xf-list-type="ol"><span style="font-family: 'monospace'"> // with 'config' auth_type)</span></li> </ol><p></p><p></p><p></p><p></p><p>If this will be accessible from the web, you’ll most likely want to use HTTP authentication, in which case change config to http and leave user and password empty. Save the file as config.inc.php in your phpMyAdmin folder.</p><p></p><p>For some reason on a Windows machine, phpMyAdmin seems to want access to php_mbstring.dll . To solve this open c:\Windows\php.ini (or WINNT if Win2K) and find the following:</p><p>; Directory in which the loadable extensions (modules) reside.</p><p>extension_dir = "./’</p><p>Change that to</p><p>; Directory in which the loadable extensions (modules) reside.</p><p>extension_dir = "./extensions/"</p><p></p><p>Then scroll down to this line and uncomment it (remove the leading semi-colon)</p><p>extension=php_mbstring.dll</p><p></p><p>Now, in theory you should be able to go to <a href="http://localhost/phpMyAdmin/index.php" target="_blank">http://localhost/phpMyAdmin/index.php</a> and you should be working. “In Theory”. However, I’ve done four Windows installations on Win2K, XP and Windows 2003 Server machines, and this is where I always run into a snag. For some reason, there seems to be a bit of a problem with the MySQL authentication protocol that it doesn’t like. Since one of our members recently had this problem and rather than retyping everything, simply read the post here for the workaround to this:</p><p><a href="http://www.ozzu.com/ftopic55568.html" target="_blank">ftopic55568.html</a></p><p></p><p>Well, that was a bit lengthy, but if all went well, now you should be happily ready to start serving up PHP pages on your Windows computer. My turorial may not include every specific detail, nor will it answer every problem you might encounter. But it should get you to where you have a good installation. </p><p></p><p>If anyone has additional information, feel welcome to add it. Good luck with your install!</p><p> <a href="http://www.boastingrights.com/" target="_blank">Boasting Rights Sports Forums and Pools</a>. NFL 2008-2009 pool is available now! Sign up and play for free in the Slingin' Sammy's NFL Pool forum!</p><p>Nuclear Services - <a href="http://www.alaron-nuclear.com/" target="_blank">www.alaron-nuclear.com</a></p></blockquote><p></p>
[QUOTE="DJ.ROCKSTAR, post: 3170581, member: 108570"] [B]TUTORIAL: How to install PHP and MySQL on IIS[/B] With the apparent increase of interest in individuals desiring to install PHP and MySQL on computers running Windows operating systems, I thought it would be beneficial to provide a set of instructions to help make this process as easy as possible. In this article, I’ll be providing some basics of IIS installation and then move to the installation of PHP and MySQL. Some essentials you will need to get started: IIS (preferably IIS 5 or IIS 6) The PHP windows installer file The PHP binaries file The MySQL Windows installation file (links will be provided for the downloads shortly). Optional: phpMyAdmin MySQL Administrator Let’s get started. Since you are installing on a Windows computer, you will most likely be using IIS for a web server, however, it is not required. You must have some web server running however, and you are quite welcome to use Apache or another web server of your choice, however, since that falls outside the scope of this tutorial we will leave that discussion for another day. Some things to know about IIS. IIS v5.1 is included with Windows 2000 Professional, and Windows XP Professional, but is not installed by default. (*note – IIS 5.1 is not included with XP Home edition and is not available as a stand alone download from Microsoft. If you are an XP Home user, you will need to look for an alternative web server solution.) Windows 2000 server includes IIS 5.1, and Windows 2003 server includes IIS 6. If you haven’t already done so begin by installing IIS. To do this go to Control Panel | Add/Remove Programs | Add/Remove Windows Components. In the dialogue box that comes up, check the option for Internet Information Services(IIS) and click the “Details” button. Select any additional features that would like to have installed and click OK. Click OK again to begin the installation. This will install IIS and start the web server service automatically. You should not need to reboot. To test your installation open your web browser and type in [URL="http://localhost/"]http://localhost/[/URL] . This should bring up the default IIS page. If it does, your installation was a success and you can immediately get started on installing PHP. It really shouldn’t matter whether you install PHP first or MySQL first. I’ve simply gotten into the habit of beginning with PHP, so that will be my next step. To get the files you will need, go to the download page at [URL="http://www.php.net/downloads.php"]php.net[/URL] . The most current release available for download at the time of this writing is 5.1.1. This release has worked just fine for me, so it’s the one I use. You will want to download both the PHP 5.1.1 zip package AND the PHP 5.1.1 installer. Unzip both files to a temporary location and run the setup installer. This will install PHP automatically. The default installation directory is C:\PHP and I would suggest to leave it at that, unless there is a specific reason you need to install it elsewhere. *note it is not recommended to install PHP in a directory that contains spaces such as c:\Program Files\PHP as it can cause some web servers to crash. Answer the questions as they are presented by the wizard. I recommend choosing the option to add PHP to the Windows PATH environment variable when that option is presented. If not you can manually add it later, but you really should include it. For a good article on Windows environment variables [URL="http://vlaurie.com/computers2/Articles/environment.htm"]go here[/URL] . When the installer completes you will have a basic installation of PHP. This works just fine, but it is recommended to add the additional libraries found in the PHP 5.1.1 zip package. Simply copy those files into the C:\PHP directory. The following files in this package are already installed with your PHP and there is no need to copy them install.txt, license.txt, php.exe and php4ts.dll. To test your PHP installation copy the following into a file and save it as info.php in c:\Inetpub\wwwroot\ . (wwwroot is Windows IIS default website folder. Any of your web files will always go in there) [URL="http://www.ozzu.com/#"]Line number On/Off[/URL] Code: [URL="http://www.ozzu.com/#"]Select all[/URL] [FONT=monospace][LIST=1] [*]<?php phpinfo(); ?>[/LIST][/FONT] Then go to your web browser and type: [URL="http://localhost/info.php"]http://localhost/info.php[/URL] . If your installation was successful, this should display your PHP configuration information. Now we can proceed to installing MySQL. Go to the MySQL [URL="http://dev.mysql.com/downloads/mysql/5.0.html"]download page here.[/URL] . As of this writing the most current release is v5.0.16. Download the Windows(x86) file (the 33.6MB file). This is the full package and includes the installer. Unzip it to a temporary location and run the installer. For the most part, especially for someone doing this the first time, it’s easiest to use the standard installation. This will essentially configure all the basic things you need to have MySQL work. During the configuration you will be asked which port to use. The default port 3306 is usually fine, however if you know something else is already using that port, you can select another one. Your “super” user that will be created during the install is user “root”. Root is the chief administrative username and can do anything in MySQL. You can add other users later after you’re up and running, but root is going to be your main admin access. Remember the root password you use. If you lose or forget it, there is no way to access it, and you could find yourself unable to use MySQL. Complete the wizard. Now let’s test it to make sure it’s working. Go to Programs | MySQL | MySQL Server 5 | MySQL Command Line Client. This is a utility similar to DOS for managing MySQL. At the password prompt type in the password you entered and hit enter. If your server is working properly you should get something that looks like this: Quote: Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 5.0.16-nt Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> If you see that, your installation was successful. You can type quit or exit to close the Client. Now there are some purists out there that probably swear by that command line client and use it exclusively for managing their server. However, for us spoiled Windows dummies that are used to “easy-to-use” GUI’s there is an alternative good tool for your server management - MySQL Administrator which can be downloaded from [URL="http://dev.mysql.com/downloads/administrator/"]HERE[/URL] . The installation is very straightforward. After it’s installed simply run it. For your logon the host would be localhost, the port would be the port you used when installing MySQL (default 3306) and the user would be root with the password you gave on installation. Since administering your MySQL server is beyond the scope of this article, we’ll leave that for another day, however, you’ll see very quickly the ease with which you can add users and create and manage your databases. The last tool that I listed as optional, I actually couldn’t live without it, and that is phpMyAdmin which can be downloaded [URL="http://www.phpmyadmin.net/home_page/index.php"]HERE[/URL] . Simply unzip the contents to a temporary directory. Create a folder called phpMyAdmin in c:\Inetpub\wwwroot\ and copy your extracted phpMyAdmin download files in there. Then open config.default.php in an editor and edit the following as needed. Make sure the port number here $cfg['Servers'][$i]['port'] = '3306'; matches the port you used when installing MySQL. If you are going to only be using this as a development machine and it will not be connected to the internet or accessible from the internet use the following configuration for these three lines: [URL="http://www.ozzu.com/#"]Line number On/Off[/URL] Code: [URL="http://www.ozzu.com/#"]Select all[/URL] [FONT=monospace][LIST=1] [*] [*]$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)? [*]$cfg['Servers'][$i]['user'] = 'root'; // MySQL user [*]$cfg['Servers'][$i]['password'] = 'yourpassword'; // MySQL password (only needed [*] // with 'config' auth_type)[/LIST][/FONT] If this will be accessible from the web, you’ll most likely want to use HTTP authentication, in which case change config to http and leave user and password empty. Save the file as config.inc.php in your phpMyAdmin folder. For some reason on a Windows machine, phpMyAdmin seems to want access to php_mbstring.dll . To solve this open c:\Windows\php.ini (or WINNT if Win2K) and find the following: ; Directory in which the loadable extensions (modules) reside. extension_dir = "./’ Change that to ; Directory in which the loadable extensions (modules) reside. extension_dir = "./extensions/" Then scroll down to this line and uncomment it (remove the leading semi-colon) extension=php_mbstring.dll Now, in theory you should be able to go to [URL="http://localhost/phpMyAdmin/index.php"]http://localhost/phpMyAdmin/index.php[/URL] and you should be working. “In Theory”. However, I’ve done four Windows installations on Win2K, XP and Windows 2003 Server machines, and this is where I always run into a snag. For some reason, there seems to be a bit of a problem with the MySQL authentication protocol that it doesn’t like. Since one of our members recently had this problem and rather than retyping everything, simply read the post here for the workaround to this: [URL="http://www.ozzu.com/ftopic55568.html"]ftopic55568.html[/URL] Well, that was a bit lengthy, but if all went well, now you should be happily ready to start serving up PHP pages on your Windows computer. My turorial may not include every specific detail, nor will it answer every problem you might encounter. But it should get you to where you have a good installation. If anyone has additional information, feel welcome to add it. Good luck with your install! [URL="http://www.boastingrights.com/"]Boasting Rights Sports Forums and Pools[/URL]. NFL 2008-2009 pool is available now! Sign up and play for free in the Slingin' Sammy's NFL Pool forum! Nuclear Services - [URL="http://www.alaron-nuclear.com/"]www.alaron-nuclear.com[/URL] [/QUOTE]
Insert quotes…
Verification
Hathara warak wissa keeyada? (Hathara wadi karanna 20)
Post reply
Top
Bottom