Discussion:
Upgrading Apache on Windows
(too old to reply)
l***@gmail.com
2005-10-14 20:11:31 UTC
Permalink
What is the correct procedure with upgrading Apache server on Windows
2000? Do I have to uninstall the previous version? I'm using 2.0.54 at
the moment, wanted to install 2.0.55 from a precompiled .msi binary,
but the installation wouldn't start -- all I got was an error message
saying that another version of Apache is already installed on the
system.
Björn Dietz
2005-10-15 11:47:58 UTC
Permalink
Hi,

the Apache2-Installer for windows doesn't allow another installation of
Apache2 on the same machine. Here's what I did today and what worked out
properly. It took me less time than to write this post.

I have a minimal configuration of Apache2 on my system, I just use it to
test webpages with some php in it before updating a "real" webserver.
Apache2 listens to port 8080, while there's an IIS listening to port 80.
I didn't do more changes to the apache configuration than integrating
php5. If you did more changes to your Apache2 configuration, you might
want to skip my way of doing that update and wait for a reply from a
more skilled Apache2 user!

1. backup your old Apache2 directory
2. uninstall Apache 2.0.54 (you might want to remove the whole directory)
3. if you used it as a service, check that the service is removed. if
not, remove it manually.
4. install Apache 2.0.55 while using the msi-installer
5. (if necessary) edit your new httpd.conf file while copying your
additions from the old httpd.conf (see backup!) to the new file
6. (if necessary) copy all your own files (mostly the ones in htdocs) to
the new directories.
7. If the installer didn't start Apache automatically, start it manually!

As I said, it took me more time to write this email than to update
Apache2 on my machine. I think there are better ways of doing this (and
even more bullet-proof ones), but it worked for me fine.

cheers, bjoern
Post by l***@gmail.com
What is the correct procedure with upgrading Apache server on Windows
2000? Do I have to uninstall the previous version? I'm using 2.0.54 at
the moment, wanted to install 2.0.55 from a precompiled .msi binary,
but the installation wouldn't start -- all I got was an error message
saying that another version of Apache is already installed on the
system.
Purl Gurl
2005-10-15 16:46:11 UTC
Permalink
Björn Dietz wrote:

(snipped very good advice from Björn)
Post by Björn Dietz
the Apache2-Installer for windows doesn't allow another installation of
Apache2 on the same machine. Here's what I did today and what worked out
properly. It took me less time than to write this post.
Readers should follow advice from Björn. His method is the best method.

To add better understanding, there are two basic factors which lead to
an inability to upgrade Apache on Windows without first removal of Apache.

Apache installation checks for prior versions through registry checking
and MSI installer data checking, indirectly. Apache installer is not
designed to "upgrade" a prior version.

When an Apache entry is found in Windows registry, Apache installer
rejects installation, which is correct behavior. Apache install is
not designed to "upgrade" but rather is designed to install a complete
Apache version. Attempts to install a new Apache version over an old
Apache version, almost always results in serious problems.

I write of this to caution readers to not "overwrite" a prior version
of Apache, which will create problems resulting in your having to
remove everything, manually, editing your registry and beginning over.

You can edit out Apache registry information, and edit the MSI installer
database to remove Apache information, then overlay Apache over the exact
same version of Apache.

Doing so "might" be beneficial for case examples when you install the
exact same version over the same version, to correct corrupt files.
This is a "repair" action, not truly a new install nor upgrade. There
are instances when a select file becomes corrupt leading to problems.
Often, tracing down which file is corrupt, is extremely difficult.
A "repair" overlay installation usually, not always, but usually helps.

Using this overlay method allows you to retain custom directory and
files such as found in Apache "user" directories; no need to copy
them back in as with a new installation. You can also copy back in
your httpd.conf file, which you saved elsewhere, to return to your
orginal configuration.

However, as Björn indicates, ALWAYS backup your files just in case.
An example is your httpd.conf file which will be overwritten by
installing over an existing Apache installation.

Follow advice given by Björn for installing a new version of Apache.

If you simply need to "fix" a corrupt file, editing out registry
entries for Apache, editing out MSI database entries for Apache,
will allow you to overlay Apache when using exact same versions.

Nonetheless, what I write is not suggested unless you are willing
to take a chance on "something" going wrong. What I write is a
good shortcut method to correct a corrupt Apache, but is a method
requiring good skills at editing registries and databases.

A caution is if you make a mistake editing your Windows registry,
you can leave your machine unable to boot. This is dangerous.

To close, Apache install looks for registry entries and indirectly
looks for MSI installer entries. You can only "safely" remove those
entries by using Windows "remove program" feature in Control Panel.
If Windows fails to remove Apache or you need to repair Apache,
you can manually edit out those entries. This is not advised.
Nonetheless, now you know "why" you cannot "upgrade" Apache but
rather must do a full install; registry and database entries.

Use those methods presented by Björn. His methods are best.

Purl Gurl

Loading...