Installing and setting up Apache Webserver with PHP – Setting up Private WoW Server

Update: Please check the updated post on Installing Apache, PHP, MySQL on Windows XP (for XP users) or Installing Apache, PHP, MySQL on Windows Vista (for Vista and 7 users) instead.

And if you’re looking for an updated wow private server guide, please check the new version on how to create wow private server for better version. Besides the new guide list everything in a single page for easier reading

This is the fourth part of the Creating your own World of Warcraft Server using Mangos

  1. The First part is all about Installing and Configuring MySQL on your Windows Machine
  2. The Second part is about Configuring the WoW Mangos itself
  3. The Third part is all about Setting up Private WOW Server for Lan Party
  4. The Fourth part is all about Installing and Setting up Apache Webserver with PHP

Okay this is the last part of my guide about creating and setting up private wow server. And as the title said, this part is all about setting up webserver using apache on your pc that can be used to put the registration page for your private wow server

Previously i’ve said that i want to tell you on how to create the registration page for your wow server. Unfortunately, it seems impossible (if you know a good registration page that can be used for WoW Classic Server and TBC Server … please let me know) because different mangos version use different structure like column number differences between the wow classic server with the wow tbc server inside the realmd.account table. So in this guide im going to tell you to use the simple registration page created by that can be used for the registration page of your WoW Classic Server

But i think you don’t have to worry about that, because if you understand the steps required to set up webserver on your pc, basically you’ve done the important part with the exception you might need to edit / create the registration page by yourself

As a side note, you can also use your webserver for many other things like hosting your own webpages from your own computer :)

That’s all for the intro … now we’re going to start the guide

Requirements :

  • Apache HTTPD (Free / Open Source) – In this example i use Apache (Apache 1 Series)
  • PHP Win32 Zip Version (Free / Open Source) – In this example i use PHP 4.4.3 (PHP4 Series)
  • Know how to setup port forwarding
  • A simple registration page for mangos

Optional : Some people might prefer the easiest way of doing it … and if you like it that way then i’d suggest you to use XAMPP instead. But if you decided to use XAMPP and you already followed my previous mysql installation guide, you don’t need to enable the MySQL Service from XAMPP Control Panel

Note : i never tried using XAMPP but from the screenshot at XAMPP Website i think the XAMPP provides you a control panel / menu to enable or disable individual service from it

Important Note : Please take caution if you want to make your webserver accessible to everyone, because this guide only tell you the basic way of setting up webserver from your own computer

Installing Apache Webserver :

Since Apache installation for Windows is straightforward, you can just simply follow the setup process until this part, and then continue with the installation process until finished :

Apache Host Configuration

and don’t forget to remember the path where you’re going to install it

Apache path

Installing PHP :

First of all you need to extract php into somewhere on your harddrive, and in this example the php location is at C:\PHP. And after you’ve finished extracting it, go to C:\PHP\Sapi from Windows Explorer and copy the php4apache.dll into the root of the php directory. If you choose to use Apache 2, then you need to copy the php4apache2.dll instead

Here’s what it should look like :

Copy PHP dll into PHP root directory

Installing PHP as module in Apache HTTPD :

Now after finished with the previous steps, you need to configure apache to load the php4 as a module. And here’s how to do it

1. Open httpd.conf in your Apache conf directory (in this example, the httpd.conf can be found at C:\Program Files\Apache Group\Apache\conf\httpd.conf)

2. Uncomment the :

LoadModule rewrite_module modules/

and add this line after all the loadmodule :

LoadModule php4_module “C:/php/php4apache.dll”

Example image below :

Apache load php module

3. At the addmodule section uncomment the :

AddModule mod_rewrite.c

and then at this line :

AddModule mod_php4.c

example image below :

Apache add module

4. At the addtype section add this line :

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

Apache addtype

5. Now at the DirectoryIndex section add / replace the previous line with this one :

DirectoryIndex index.html index.php

Apache directory index

From the above example, the index.html always get first priority over index.php file but you can change it as you like

Testing your Apache Installation :

As for the last, now you need to open the command prompt window (Start Menu -> Run -> type CMD) or Start Menu -> Accessories -> Command Prompt

and type :

  1. Net stop apache
  2. Net start apache

This is done to make apache reload the configuration files that have been changed

Apache test page

Now you’ve finished with all the process, but of course you need to make sure your webserver is working properly so now you need to test it by typing http://localhost via your browser and if you see something like above image, that means your webserver is working

You’ve finished setting up apache webserver, mysql and php on your computer .. Now what you should do next ? well … because this is part of the mangos series guide, of course now you need to put the registration page you’ve downloaded previously into your www document root directory

If you followed this guide, the document root can be found at C:\Program Files\Apache Group\Apache\htdocs … but since the webserver is located on the same location as where you are, you don’t need FTP Program to do it, you just need to copy / extract the simple registration page into that directory … simple isn’t it ?


Note: Comment may not appear right away.

134 comments on “Installing and setting up Apache Webserver with PHP – Setting up Private WoW Server

  1. Сайт компании по реализации бетона, песка, цемента, сыпучих материалов, железобетона. Продаем бетон марок М50, М100, М150, М200, М250, М300, М350, М400. Производство высококачественного товарного бетона, продажа цемента, песка, керамзита, сухих строительных смесей.

  2. Hello:

    I am having some problems setting up Apache 2.0 Apache shows locally when I type the internal address however when I try to connect externally I can’t get apache to connect to my internet provider’s ipaddress.

    I am using Windows xp. The error message I am getting is can’t listen to port 80. However I changed port 80 to port 21 and port 8080 in the configuration file and the dos prompt does not stay on.

    Any help you can give me would be gladly appreciated. My phone number is 204-694-8950 you can call me collect if you wish. I checked the configuration files and yet still I am still having the problems.

    Thanks in Advance


  3. I installed xampp and it’s working fine but i have a problem.
    Even though I setup port 80 in both my firewall and router I’m told there’s a port issue seems that something else is using port 80. how do I detect that and fix the collsion?

  4. #Paragon

    hey thanks alot that link was a browser takeover site I love having my system overload with popups

  5. Найти фамилию и адрес в Санкт-Петербурге по телефонному номеру абонента МТС – здесь поможет мобильный телефонный справочник и мобильная база данных МТС, Мегафон. Поиск человека по адресу и по фамилии в базе данных сотовых операторов Петербурга быстро и легально.

  6. Узнать в Петербурге адрес и имя по номеру мобильного владельца сим-карты Мегафон – используется мобильный телефонный справочник СПб и телефонная база данных Мегафон, МТС. Поиск человека по адресу и по фамилии в базе данных сотовых операторов Санкт-Петербурга легально и быстро.

  7. Could some one help me, i cant seem to fined reaper-x registration page for my own web page.
    thx if anyone can help

  8. Hey Frantic,

    for some reason my last comment got flagged and is awaiting moderation, so I logged in and am resending info to you. I couldn’t find my old index.php file and my new one is with a changed database that is too diferent too work without changing your db too match. I’ll send a reply as soon as I’m done with a new index.php for you.


  9. Hey Frantic,

    I’ll load my old one which was just the one they provided with some fixes.. Looking for it now, will send in a few minutes after I check to make sure it works..


  10. just wondering if someone can post a full php script for users login and register page would be helpfull thanks so much

  11. err: depends on your user/pass/email inputs…

    function sha_password($user,$pass){
    $user = strtoupper($user);
    $pass = strtoupper($pass);

    return SHA1($user.’:’.$pass);

    $u = $_POST[‘username’];
    $pass = $_POST[‘password’]

    $p = sha_password($u,$pass);
    mysql_query(“INSERT INTO account (username,I,email) VALUES (‘$u’,’$p’,’$e’)”);

  12. Ok, This should work to create the encrypted password from the username/password needed in column “I” of database. It worked for me…

    function sha_password($user,$pass){
    $user = strtoupper($user);
    $pass = strtoupper($pass);

    return SHA1($user.’:’.$pass);

    $u = $_POST[‘username’];
    $p = sha_password($username,$password);

  13. Oh, and btw, I got the“Players Currently Online” to work. Problem was that the character “online”(not Account “online”) column was in the characters db, not the mangos db.

    *** So what Was:

    $mysqlcon = mysql_connect(“″,”root”,”mypass”);
    $mysqlres = mysql_query(“SELECT `name`,`guid`,`class` FROM `character` where `online` = 1”);
    while (($thisuser = mysql_fetch_array($mysqlres))) {
    echo ‘‘;
    echo ‘

    *** Should read:

    Players Currently Online

    $mysqlcon = mysql_connect(“″,”root”,”mypass”);
    $mysqlres = mysql_query(“SELECT `name`,`guid`,`class` FROM `character` where `online` = 1”);
    while (($thisuser = mysql_fetch_array($mysqlres))) {
    echo ‘‘;
    echo ‘

    or something there about…
    ** big change was:


    everything else was cosmetic for my site, from what I remember…

  14. Well, I guess the “I” column IS the password or at least it is a function of the password and the username… When you create a username and password from the mangos> command prompt the username goes into a username field, but the password does not show up in a password field, instead, the username and password are used to create an encrypted field “I”.

    *** I need to know ***
    Does anyone know how I can encrypt the username and password submitted in my website in .php so that it can be inserted into the “I” field of my database and work properly as the password created by the user at the game login menu.


  15. Ok, I’m giving up on this for now. Apparently the “I” is not the password either. and the only columns I see in Account in Realmd are as Follows:

    So, I could really use some help with the function that sends data to the account in realmd so that ppl can create their own accounts on the website and the log in to the game.

  16. Oh, and one more thing…

    I wanted setbc = 1 for all users by default.

    Everyone already had the bc expansion.

    I used SQLyog to edit the realmd database, double-clicking or expanding the table “account” in “realmd” and then right-clicking on Columns and selecting “Manage Columns” third column over “Defaults” and down in the “tbc” field edit 0 to 1

  17. Problem: Could not create accounts from webpage.
    Fix: column for password in db is I not password, plus I got rid of all the other junk cause most defaults are fine, and other columns don’t match as well, ie. banned.

    Problem: was missing the email request,
    Fix: added:
    Email Address:

    ** Data sent to db Was:

    $q = “insert into account ( username,password,gmlevel,sessionkey,joindate,banned,last_ip,failed_logins,locked,last_login,online) values (‘$u’,’$p’,’0′,”,NOW(),’0′,’′,’0′,’0′,’2000-01-01 00:00:00′,’0′)”;

    Changed to:
    $q = “insert into account ( username,I,email) values (‘$u’,’$p’,’$e’)”;

    Plus this change made more sense as well. this is my first time with php so don’t dis…
    It Was:

    $r = mysql_query($q);
    if (!$r) { echo “MySQL error: ” . mysql_error().”!”; } else { echo “Registration Completed!”;}
    echo ‘Return to add another.‘;

    I changed it to:

    $r = mysql_query($q);
    if (!$r) { echo “Error:” . mysql_error().”! **Try a different username** “; } else { echo “Registration Completed!”;}
    echo ‘Return to add another.‘;

    It made more sense to me. I know I coulda put another if in to verify the error was a duplicate username, but since i figured it’s gonna be a duplicate username 99% of the time it’d be ok to let it slide…

    I still am not getting my online chars to show up.. if someone reads this please help … I have:

    Players Currently Online

    $mysqlcon = mysql_connect(“localhost”,”root”,”mypass”);
    $mysqlres = mysql_query(“SELECT `name`,`guid`,`class` FROM `character` where `online` = 1”);
    while (($thisuser = mysql_fetch_array($mysqlres))) {
    echo ‘‘;
    echo ‘

  18. In the previous post err:

    I would like to figure out a way to set all newly created accounts to BC, ( ie. setbc acctname 1 )
    but from the index.php and not the mangos command prompt

  19. Hey! – Kudos!
    Great Guide! Following directions everything worked perfectly. The images were a great idea to verify I was on the right track. I can’t thank you enough!

    When my index.php is accessed by a web browser everything seems to appear fine, however i don’t believe it is accessing the db correctly. It is not showing players online, and when I go to create an account I get the following error message:

    MySQL error: Unknown column ‘password’ in ‘field list’!Return to add another.

    Also I would like to figure out a way to set all newly created chars to BC or maybe have a way to have it as an option in the index.php. Wondering if it could be added to the following line somehow:

    $q = “insert into account ( username,password,gmlevel,sessionkey,joindate,banned,last_ip,failed_logins,locked,last_login,online) values (‘$u’,’$p’,’0′,”,NOW(),’0′,’′,’0′,’0′,’2000-01-01 00:00:00′,’0′)”;

    sorry for the long post… Hope you are still there. I can give more details if you need them.

    Also, I’m using the following:
    $db_u = “root”;
    $db_p = “mypass”;
    $db_host = “”;

  20. I have Unzipped the XAMPP and started the xampp_start.batch file.
    But,There is an error and it says

    A service specific error occurred: 1.

    More help is available by typing NET HELPMSG 3547.

    When I type that, this message appears:

    The *** service is stopping