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”:

Add the following towards the bottom of the file:

This section already exists; you just need to add the additional default documents:

Change both of these lines to the new document root location:

Make a copy of the Apachephpphp.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:

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.

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 Apachehtdocsjoomla directory that contains the following:

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 Apachehtdocsjoomla directory that contains the following:

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.

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.

µ

10 Comments

  1. Oyvind

    I got this message, what is wrong?:

    Warning: mysql_connect(): [2002] A connection attempt failed because the connected party did not (trying to connect via tcp://hedda:3306) in C:Datawwwhtdocsjoomlamysqltest.php on line 2 Warning: mysql_connect(): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:Datawwwhtdocsjoomlamysqltest.php on line 2 Fatal error: Maximum execution time of 30 seconds exceeded in C:Datawwwhtdocsjoomlamysqltest.php on line 2

    Reply
    • µ

      Here’s what I would try: Add the telnet client feature if using Windows 2008 or 2008 R2. Drop to a command line and type “telnet mysqlservername 3306” without the quotes. If it times out, try the mysqlserver ip address in place of the name. It sounds like either the mysql server is not listening on port 3306 (possibly a firewall issue) or possibly a name resolution issue. If MySQL is on the same machine as Apache, PHP, and Joomla, try using 127.0.0.1 instead of the servername when trying to connect to MySQL.
      µ

      Reply
  2. Oyvind

    Thanks, that did work…

    Reply
  3. Matzit

    I confirm. All above told the truth. We can communicate on this theme.

    Reply
  4. Oyvind

    When I try to install phpmyadmin 3.3.1, it stops after some time after typing root as user and my password. I test the password in mysql command prompt and it works there! What could be the issue?

    Reply
  5. Oyvind

    I found the answer, I had to change hosts file and set in 127.0.0.1 localhost

    Reply
  6. Michael K

    Thanks for the awesome instructions. Saved a lot of time trying to collate it from multiple sources.

    Reply
  7. Sean Molenaar

    or you could just download web platform installer and install joomla that way

    Reply
  8. nader

    hi
    error not support mysql on one server

    Reply
  9. http://google.com

    This is really the 2nd post, of yours I read through. But I really enjoy this specific 1,
    “Joomla 1.5 on Windows Server 2008 R2 | Mike F Robbins” the very best.
    All the best ,Vivian

    Reply

Leave a Reply

%d bloggers like this: