Common Problems on Windows
Windows has its own distinct set of problem areas that don’t apply to Unixish environments.
Cannot Determine Hostname
When trying to start Apache from a DOS window, you receive a message like, “Cannot determine hostname. Use ServerName directive to set it manually.”
If you don’t explicitly supply Apache with a name for your system, it tries to figure it out. This message is the result of that process failing.
The cure for this is really quite simple: edit your conf\httpd.conf file, look for the string
ServerName, and make sure there’s
an uncommented directive such as:
ServerName localhost
or:
ServerName www.foo.comin the file. Correct it if there is one there with wrong information, or add one if you don’t already have one.
Also, make sure that your Windows system has DNS enabled. See the TCP/IP setup component of the Networking or Internet Options control panel.
After verifying that DNS is enabled and that you have a valid hostname in your ServerName directive, try to start the server again.
Finding WS2_32.DLL on Windows
When trying to start Apache on Windows 95, a message like, “Unable To Locate WS2_32.DLL...” appears. This file is necessary for Apache to function properly.
Prior to Version 1.3.9, Apache for Windows used Winsock 1.1.
Beginning with Version 1.3.9, Apache began using Winsock 2 features
(specifically, WSADuplicateSocket()). WS2_32.DLL implements the Winsock 2 API. Winsock 2 ships with Windows NT 4.0 and Windows 98. Some of the earlier releases of Windows ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access