Joomla 1.5 on Windows Server 2008 R2
I will be diving into the dark side with this blog since I prefer working with Microsoft based technolgies such as SharePoint and ASP.NET. Each time I work with PHP and MySQL, it seems like it takes a little Voodoo to make them work. This blog is the bare minimum configuration to get Joomla working on a Windows 2008 R2 Server with Apache, PHP, and a remote MySQL server.
First, download the latest version of Apache HTTP Server win32 binary without crypto MSI installer, PHP VC6 thread safe zip file, MySQL Community Server essential 64 bit MSI installer, and Joomla. Currently, Apache does not have an official 64 bit version, but the 32 bit version works fine on 64 bit operating systems. For PHP, make sure you download a VC6 version since the VC9 versions are only for use with IIS. If for some reason you are going to move an existing Joomla 1.0 installation to a new server without upgrading it to Joomla 1.5, be sure to use PHP 5.2.x since PHP 5.3.x is not supported with Joomla 1.0. The content on your pages will not display correctly if you use Joomla 1.0 and PHP 5.3.x. For this demonstration, I have built two Windows 2008 R2 servers, one will host the frontend or Apache, PHP, and Joomla, and the other will host the backend or MySQL.
On the frontend server install Apache, do a custom install and take all of the defaults except change the drive letter to the data drive. Opening up the operating system drive or partition to the Internet via a web server is bad mojo. Add the httpd.exe program to the allowed programs firewall exception list. At this point you should be able to access the web server and receive a test page that says “It Works!”
Next, unzip the PHP zip file into a subfolder of the Apache folder and name the folder php. Unzip the Joomla zip file into a subfolder of the Apache\htdocs folder and name the folder joomla. Make a copy of the Apache\conf\httpd.conf file and open the original file in your favorite text editor. Add the following in the section with all of the other “LoadModules”:
LoadModule php5_module php/php5apache2_2.dll
Add the following towards the bottom of the file:
AddType application/x-httpd-php .php PHPIniDir "D:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/"
This section already exists; you just need to add the additional default documents:
<IfModule dir_module> DirectoryIndex index.html index.php main.php index.html.var index.cgi </IfModule>
Change both of these lines to the new document root location:
<Directory "D:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/joomla"> DocumentRoot "D:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/joomla"
Make a copy of the Apache\php\php.ini-production and name it php.ini. Open the php.ini in your favorite text editor. Uncomment the following three lines and set the path for the extension directory:
extension=php_mbstring.dll extension=php_mysql.dll extension_dir = "D:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext"
Restart the Apache service on the frontend server.
Install MySQL on the database server. Choose the custom install option and change the destination drive to the data drive. Select configure MySQL now and take the standard configuration option. Select the “Install as Windows Service” and “Include Bin Directory in Windows PATH” options. Set a root password.
Open the MySQL Command Line Client. Create a database and user for Joomla. Assign the user permissions to the database.
CREATE DATABASE joomladb; CREATE USER 'joomladbuser'@'%' IDENTIFIED BY 'joomladbpassword'; GRANT ALL PRIVILEGES ON `joomladb` . * TO 'joomladbuser'@'%';
Add the mysqld.exe program to the allowed programs firewall exception list on the backend server and restart the MySQL service.
Open a web browser and direct it to the DNS name of the website. The Joomla install should start. On the pre-installation check, if all of the options are not in green, you did something wrong.

Enter the information you used when creating the database and user on this page:

Enter the appropriate information on this page. If you want to install the sample data, you actually need to click the button, just having the radio button selected and clicking next will not install the sample data:

Once the installation is finished, you will need to remove the installation folder that is located in the Apache\htdocs\joomla folder before you will be able to access the website.
You now have a fully working version of Joomla installed:

Troubleshooting PHP. Create a phptest.php file in the Apache\htdocs\joomla directory that contains the following:
<?php phpinfo(); ?>
Navigate to the DNS name of the website /phptest.php. You should receive a page that shows all of the PHP settings:

Troubleshooting MySQL Connectivity. Create a mysqltext.php in the Apache\htdocs\joomla directory that contains the following:
<?php
mysql_connect("mysqlservername", "mysqlusername", "mysqluserpassword") or die(mysql_error());
echo "Connected to MySQL<br />";
?>
Navigate to the DNS name of the website /mysqltest.php. You should receive a page that shows:
![]()
If you receive nothing at all or an HTTP 500 Internal Server Error, edit the php.ini file and set the following. Restart the Apache service on the frontend server for the changes to take effect.
display_errors = On
This will allow you to see the actual error message which may be something similar to this:
This is most commonly caused by not uncommenting the two modules in the php.ini file listed above or not setting the extension_dir parameter correctly in the php.ini.
Be sure to turn the display_errors option to off and delete both the php and mysql test files before placing the server into production.
µ









