Installation of Php-Mysql-Joomla On Windows Server 2008 32 Bit OS
Installation of Php-Mysql-Joomla On Windows Server 2008 32 Bit OS
Installation of Php-Mysql-Joomla On Windows Server 2008 32 Bit OS
1. Go to Server Manager
2. Go to Roles click on add roles
6. Click on install
7. After completion of installation click on close button
8. In Server Manager Click on Web Server (IIS) under Roles and configure IE ESC
9. Temporarily disable Administrator security. It helps while configuring the Joomla. After installation of
joomla enable this security.
Install and Configure MySQL for PHP Applications on IIS 7
Introduction
While Microsoft® SQL Server® 2008 is the recommended database to use when hosting PHP applications on an
Internet Information Services 7 (IIS 7) Web server, you can also use MySQL as the database. Currently, many
popular PHP applications use MySQL Server for data storage. Using MySQL requires hosting providers to include
MySQL database support with the hosting packages.
MySQL cannot currently be installed with the Microsoft® Web Platform Installer (Web PI). This article provides
guidance for installing MySQL manually.
It is recommended that you install MySQL on a dedicated server rather than installing MySQL on the same
server that is running IIS 7. The separation of database server and Web server makes overall installation more
secure and manageable and avoids resource contentions between the database and Web server processes.
2. Start Windows Installer, or extract all the files from the archive, and then start Setup.exe.
3. You can use a Typical Setup or customize the installation to suit your needs.
4. Once the installation wizard is completed, it is recommended that you leave the Configure the MySQL
Server now check box selected.
1. Run the MySQL Server Instance Configuration Wizard, and then choose the configurations options that
most closely match your environment.
For more information, see the Server Instance Configuration Wizard.
Best practice recommendations are as follows:
Select either the Multifunctional Database or Transactional Database Only options if you are using the
InnoDB storage engine or the high-speed MyISAM storage engine (for example, if the Web applications on your
server require multi-statement transactions, advanced isolation levels and row-level locking, foreign key
constraints, or atomic, consistent, isolated, and durable [ACID] features). These options provides fully ACID
transactional capabilities, but at the cost of more aggressive usage of disk space and memory.
Otherwise, use the Non-Transactional Database Only option, which is optimized for high-performance
SELECT operations. It has low overhead, in terms of memory usage and disk utilization, but at the cost of not
supporting transactions.
e. Choose the option that sets the number of concurrent connections you need.
Note: Connections require memory; if the number you choose is too big, your server may not have enough
memory.
f. You may adjust networking settings to suit your environment or accept defaults, and then click Next.
g. Select the default character set that best suits you, and then click Next.
h. We recommend enabling both Windows options here. Select both check boxes, and then click Next.
i. Type the password you want to use for the root account, and then click Next.
2. For PHP to work with MySQL, it is necessary to perform the following modifications to the Php.ini file:
a. Confirm that the extension_dir points to the folder where all PHP loadable extensions are located,
frequently in the Ext folder (for example, extension_dir=”.\ext”).
b. Enable dynamic extension for MySQL by uncommenting the corresponding line for the MySQL extension:
extension=php_mysql.dll
Secure MySQL
1. Remove the anonymous database account (if it exists). Open the MySQL command prompt by clicking Start
-> All Programs -> MySQL -> MySQL Server 5.1 -> MySQL Command Line Client:
4. Next, restrict the root account to log on only from localhost. Open a MySQL command prompt, and use the
following sequence of commands:
5. Change the name of the root user with the following sequence of commands from the command prompt:
1. To provision a new user, type the following command from the MySQL command prompt:
2. The newly created user does not have any privileges on the MySQL server by default. To create a new
database, type the following command:
3. To grant access to this database for a particular user, type the following command:
extension=php_mysqli.dll
extension=php_mbstring.dll
extension=php_mcrypt.dll
3. Restart the IIS service by clicking on Start, selecting the Search Field, typing iisreset, and then pressing
ENTER.
4. If all went well, you should see the mysqli section on the PHP information page created
earlier (http://localhost/phpinfo.php).
Well if you don’t feel like learning the command line sequences for MySQL you might be interested in using a
web based GUI based tool which will make managing the databases a lot easier.
And that is just the short list of features of this very powerful application. It recently was named Best of Open
Source Platforms and Middleware by Infoworld.
Note: PHPMyAdmin requires both PHP and MySql to be installed on the server. If you need to please refer
back to my articles on installing them:
• Installing PHP
• Installing MySql
Ok so now that we know why we should install it, let’s get to the actual installation part.
The current version as I write this article is 2.11.9, so I am going to go ahead and download that to get started.
Which version you use will depend on your environment; I am going to use the english.zip for this demo. Let’s
get started!
1. Extract the files from the archive to a site that is available on the web server (remember the application is
web based).
2. Now start IIS Manager and expand the default website; right click on phpmyadmin and left click on
Convert to Application.
3. You can leave the default settings in place for the Add Application window and click OK.
4. Create a folder to save your PHP sessions; for our example I am going to use C:\temp\phpsessions and give
full rights to the following users:
IUSR
IIS_IUSRS
Network Service
5. Now go into your php directory and find php.ini — we have to make a few changes:
Find session.save_path and set it to the same as you used in step 4 which in our case is C:\temp\phpsessions
and save the file.
6. Please note that this application requires the following extensions for PHP:
MySQL
GD
MBSTRING
If you do not have these on your server already, please install them. If you are using my article to install PHP
then in step 6 just add the above extensions to your installation, or if you already installed it rerun the installer
msi file and modify your installation to include these extensions.
To check if they are installed do a search for extension=php_mysql in the php.ini and you should see it
uncommented.
extension=php_gd2.dll
extension=php_mbstring.dll
7. Go into IIS Manager, go to the default site (that is if you have been following my demo, if you have been
modifying your site location or path then use that) and click on Default Document.
10. Go to the directory that you unzipped PHPMyAdmin to and look for a file named config.sample.inc.php
and open it in Wordpad. (You can use notepad but it tends to jumble everything up)
11. Now find the line $cfg[‘blowfish_secret’] = ‘’; you have to fill in this line with anything that you want but
it needs to be a value.
Only up to 46 characters and it can be alphanumeric. In this case I am going to use trainsignal1111TST
12. Go down to you see the section User for advanced features and uncomment (Remove the // from the front
of the line) the two lines under that and change the pmapass to a different password, for this demo I am going
to use trainsignal.
13. next, go down to the next section Advanced phpMyadmin features and uncomment all the lines under it
(remove the // from the front of the line).
15. Point your browser to http://localhost/phpmyadmin/ (if you have been following this example; if you have
used a different site/directory then point to that) and you should see a login page.
Type in the userid and password for your local MySql server, then click Go.
16. Now you are in and able to manage your MySql instance!
As a quick test let’s create a database by scrolling to the Database link and clicking on it
17. Type in the name of your new database, for this example I am going to use Trainsignaltraining and then
click Create.
18. You will now see a page that confirms that database Trainsignaltraining has been created.
That’s all there is to it, now you can quickly and easily manage you MySql databases on IIS7 through
PHPMyAdmin.
This article describes how to install and configure Joomla for use with the FastCGI extension on Internet
Information Services 7 (IIS 7) on Windows® Web Server 2008. The instructions assume that you have set up and
configured the FastCGI extension and the PHP libraries. The instructions have been tested and found to work
with the following software versions:
• PHP 5.2.9
• MySQL 5.1.34
• Joomla 1.5.14
Prerequisites
From the base default configuration file provided by PHP, modify the following lines in your Php.ini
configuration:
• Define extension_dir as c:\php\ext (for example, the location of your php extensions directory).
• Uncomment extension=php_mysql.dll in the extensions list to enable MySQL support.
In order for Joomla to work correctly with IIS 7, it is necessary to install an update for IIS FastCGI module for IIS
7.
First, download the latest stable release of Joomla. For this article, Joomla version 1.5.14 was used (future
versions are likely to be similar to install). Uncompress the Joomla files and copy them to
C:\Inetpub\wwwroot\joomla (or another directory of your choosing).
Before running the Joomla installer, create the configuration file Configuration.php, which Joomla uses to
store key configuration settings. Assign write permissions to it with the command (from the installation
directory):
The installer will modify the Configuration.php file with information provided during the installation process.
Joomla uses the Administrator\Cache folder Tmp and therefore needs to be able to write and modify files in this
folder. Grant “modify” permissions to the folder:
C:\inetpub\wwwroot\Joomla>icacls administrator\cache /grant BUILTIN\IIS_IUSRS:(OI)(CI)(M)
Joomla uses the temporary folder Tmp to store temporary files and therefore needs to be able to write and
modify files in this folder. Grant “modify” permissions to the folder:
Before starting the installation procedure for Joomla, you must create a database on your server. Also create a
user and grant this user “db ownership” permission to the database. This article uses the following database
information:
3. Verify that all pre-installation checks are successful, and then click Next.
Figure 2: Pre-installation Check page
4. Review the GNU General Public License, and then click Next.
5. On this page enter the following information, and then click Next.
6. On the FTP Configuration page, select the No option button (not to enable FTP file system layer), and then
click Next.
7. Specify the site name and the administrator password. Click Next to complete the installation.
Note: You may scroll down and install sample data if you prefer.
8. The Finish page appears, and you are instructed to delete the C:\inetpub\wwwroot\joomla\installation
directory.
By default, Joomla uses query string parameters for all the URLs it generates for your Web site. You change this
by by enabling search engine friendly URLs, a feature which relies on the URL rewriting functionality.
IIS 6.0 does not include URL rewriting capabilities; you can use a third-party URL rewriting product such as
ISAPI_Rewrite or Ionics ISAPI Rewrite Filter.
IIS 7 includes URL rewriting support, which can be enabled by installing Microsoft URL Rewrite Module for IIS 7.
2. If it does not already exist; create and open a Web.config file located in the C:\inetpub\wwwroot\joomla
directory.
5. Go to http://localhost/joomla/. All links in Joomla pages now have URLs without query string parameters. If
you click on any of these links, the server returns a correct response: