Installing on a Windows Server (Apache)
Prev | Chapter 1. Gallery 1.x Installation Guide | Next

## Installing on a Windows Server (Apache)

### Note

If you are upgrading from a previous version of Gallery, please see the Upgrading Guide.

### Note

Gallery 1.x requires certain programs to be installed before it can work correctly. For information on how to install these programs, see the installing required programs guide.

These are the steps to installing Gallery on a Windows Server

1. Unpack your downloaded Gallery files and place them under your webroot.

   (Standard installation directory is "C:\Program Files\Apache Group\Apache\htdocs"). This may vary depending on the location of your Apache installation. Don't worry if the file extension unknown to you, since WinZip and WinRAR both support .tar.gz archives.

2. Create a directory on your webspace called `albums`.

   Gallery will use this directory to store the albums you create and the images you upload to those albums. This directory can reside inside the Gallery directory or outside the Gallery directory - your choice. The only requirement is that the directory is inside your webroot. Make note of where you create this directory.

3. PHP.ini Changes

   While you are at it, check the line in `php.ini` (usually stored in `c:\winnt\php.ini`) that defines `session.save_path` The default install of PHP refers to `/tmp`, a path not valid in Windows. If that points to `/tmp`, you will have trouble when uploading pictures later on. Change that line to a valid directory, such as `C:\winnt\temp`. Make sure that this directory actually exists. Restart Apache to make sure the changes are enforced (Start Menu->Programs->Apache HTTP Server->Configure Apache Server->Edit the Apache httpd.conf Configuration File).

4. Run the `configure.bat` script in your main Gallery directory in order to put Gallery into configuration mode.

5. Run the configuration wizard, as described in this guide

   ### Note

   If the config wizard complains about missing mod_rewrite support, there is a simple solution for that. Mod_Rewrite is not enabled by default in a Windows/Apache environment. To correct this, follow these steps: Edit `httpd.conf` (Start Menu->Programs->Apache HTTP Server->Configure Apache Server->Edit the Apache httpd.conf Configuration File). This will start up Notepad. Press CTRL-F to bring out the search box, and type 'mod_rewrite' in the dialog box. You will find a line that says `#LoadModule rewrite_module modules/mod_rewrite.so`. Remove the # from that line, and press 'Find Next'. The next entry that it will find reads: `#AddModule mod_rewrite.c`. Remove the '#' from that line too.

   ### Note

   If you get this: Warning! Apache is not obeying your .htaccess file. Correct this by, following these steps: Edit `httpd.conf` (Start Menu->Programs->Apache HTTP Server->Configure Apache Server->Edit the Apache httpd.conf Configuration File) Add the text the config wizard provides to the end of the `http.conf` file.

   Save the file, and restart Apache (Start Menu->Programs->Apache HTTP Server->Control Apache Server->Restart).

   There might be other errors aswell, but the config wizard wil show you examples as to how to fix them. Just remember that everytime httpd.conf is referenced, in Windows/Apache this is the same as Start Menu->Programs->Apache HTTP Server->Configure Apache Server->Edit the Apache httpd.conf Configuration File

6. Point your browser to `http://www.example.com/gallery/` and you should see your freshly installed Gallery. Press the 'login' link, and log in with the username `admin` and the password you provided in step 2 of the configuration wizard.

7. Enjoy your new Gallery!

Prev | Up | Next
Installing on a Unix/Linux Server with Shell Access | Home | Installing on a Windows Server (IIS)