Installing and setting up Apache Webserver with PHP - Setting up Private WoW Server
By Reaper-X on Jul 9, 2007 in Apache, Guide, Tutorials, Web Servers
This is the fourth part of the Creating your own World of Warcraft Server using Mangos
- The First part is all about Installing and Configuring MySQL on your Windows Machine
- The Second part is about Configuring the WoW Mangos itself
- The Third part is all about Setting up Private WOW Server for Lan Party
- 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 Mangos-files.de 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 1.3.3.7 (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 (you can get it from here) / create one by yourself
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 :

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

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 :

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/mod_rewrite.so
and add this line after all the loadmodule :
LoadModule php4_module "C:/php/php4apache.dll"
Example image below :

3. At the addmodule section uncomment the :
AddModule mod_rewrite.c
and then at this line :
AddModule mod_php4.c
example image below :

4. At the addtype section add this line :
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

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

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 :
- Net stop apache
- Net start apache
This is done to make apache reload the configuration files that have been changed

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 ?

Website RSS Feed
Stumble this post
Bookmark this post on Del.icio.us
Submit this post to Digg
Submit this post to Reddit
Print this
Trackback URL
I am using Apache 2.0.59 for Windows and PHP 5.2.3. I can not get the LoadModule php4_module “d:/php/php5apache2.dll” to work. The file is where it is suppose to be, but Apache fails to start up if this line isn't commented. Also, there isn't an AddModule area in my httpd.conf. I find everything else, but this.
Hey, you are the man! I got this whole thing working first try. I am skipping this last quide though as I will only have a couple of friends playing, and I will just manually create their accounts. The last thing I was wondering was if you know how to set up accounts to make them with GM rights. I would like to set up my guy at lvl 70, with all epics :D
Thanks again for the guide!
A++++
# Porisius
Im really sorry for late reply, i've been sick for the past few days (i caught bad flu and still hasnt fully recovered yet)
about your question, if you're using PHP5 then you need to adjust the loadmodule to use LoadModule php5_module
as for the AddModule, you need to add that line manually :)
# Kazilah
Thank you very much for your kind words. As for change your wow player status into GM, you can change it manually using 3rd mysql client
(if you follow this guide, that means you've put php and apache in your machine, and now you can use phpmyadmin to make editing your mysql easier) :)
Well, I decided to do something different. I found a program called WAMPS, its MySQL/Apache/PHP in one. Real helpful. Seems to work great too. Little to no user setup, that I really needed to do.
dude i cant do it... :( I dint understand it.. I need help!!! I want to badly to set a register accounts into my server... plz help
If someone can give me a hand with files cause mine aint have a install.exe add me to msn: jamesql1753@hotmail.com i need a serious help!
Is there any way for auto created accounts?
i mean to type in login their desire ID: & Pass:
and log with that.
is there a way? i need to know thank you.
You said you wanted a link to a good login website for classic/TBC. Well good news, I found one! (It's not mine)
http://majestic202.phpnet.us/create.php
It's super fast. The part under the registration is a list of the players currently signed in. Consider this a token of my immense gratitude for all the help your guide has been! THANK YOU!
When I type:
1. Net stop apache
2. Net start apache
at the command prompt I get an error that says:
The service name is invalid.
or:
The specified service does not exist as an installed service.
I have reinstalled both Apache and PHP serveral times and I get the same error. I know they are installed because they appear in the programs list.
Please help.
which apache version you've installed ? if you're running apache 2, use :
net start apache2
net stop apache2
instead :)
or you can also start / stop it manually from the Windows Services
to get into the Windows XP Services area you can do these steps :
# First Method
- Open Control Panel
- Choose Administrative Tools
- Choose Services
# Second Method (my prefered method)
- Open the Run command (Windows Key + R)
- type services.msc
- press enter and that's it
How exactly would one make the webserver public? I mean, you show us how we can check it at "localhost/index.php" but what if we wanted others to see it (that's the point) at like http://insertiphere/index.php
O.o?
you need to setup port forwarding first and make it so port 80 can be accessed from outside (if you're behind router) and you're not using DMZ
nevermind, after working on it for a couple minutes I figured it out. Great guide btw, shame a couple links are dead and things are out of date. I used this guide with a different version of MaNGOS but it still helped a lot... I was surprised :D
Nothing like a little ingenuity.
oh wow you responded fast lol
actually because I was using a router and my router used 80 (wtf?) so I couldn't use 80... so I used 8080 and it still didn't work, but I realized "hey I have a firewall" so I opened that bitch up and tahdah! it worked. lol thanks :D
oh crap I ran into another problem =/
I actually don't know fully how to explain it but here I go...
So I did everything right? have everything set up, server's been running for a couple days, friends have been loving it, but now I wanna make the registration page right? So as you can tell I figured out how to make it public and stuff... but now (after config-ing it) I tried creating an account through it and it didn't work... it just gives me this blank page after clicking "submit" =/
suggestions? ideas?
Having a problem when my friends try to log on. They can log into the server, but cannot get past the realm selection screen. I’m not sure if it’s a problem with my mangos or with some security setting or what. I can log on fine, but they can’t. Anyone’s help would be greatly appreciated. Thanks.
Yeah I had that problem when I just dove into the thing. I fixed the problem by following the guide, setting up the mysql right, making sure the realmd and mangos connected right (in the conf files) and ya. Just double check everything, you may need to open some ports (mighta forgot) and if you still have the problem, uninstall, reinstall, follow guide down to every last detail. :D
lol ignore all my pleas for help because I just end up figuring them out anyway >.
I cant understand the apache download thingy, when I try to download 1.3.37 I come to some sort of directory with loads of stuff.. can someone pls provide me with the direct link? Thanks
sure just click here (MSI Installer)
as a side note, apache website detect the closest download mirror to your location, and that link is the closest mirror to me :)
Thanks :)
Hmm, in the httpd.conf I cant find any 'addmodule' sections or any addmodule commands at all, any help? Thanks
ah im sure you're missing that line because that line is always there except for additional module like php in this example
so try searching for addmodule using your fav text editor search function, and when you located the addmodule section, add the php module just like in this example (after all the builtin addmodule)
Just copyed the uncomented AddModule stuff from your picture ^^ worked swell
Heh didnt see you posted... Actually I did search for them, even searched for 'add' only too but nothing but words in comments and such
dude this is a great guide, your an idiot if you dont understand it, it isnt just a simple installer.exe people like you fustrate me!
yea, installed using XAMPP and set up everything as best i could following your guide... but one problem came.. the service path for apache2 is different from what it should be when i check the properties in the services pane it says it needs
"C:\Program Files\Apache Software Foundation\Apache2.2\bin\httpd.exe" -k runservice
but my apache isnt set up in that directory.. and the thing wont let me change the path from the services pane
i need to change it so it works with XAMPP, i think it should be "C:\xampp\apache\bin\httpd.exe" -k runservice
any help with this is appreciated
actually, i edited it in regedit... and i still dont work... now it says "Error 123:The Filename, Directory Name, or label syntax is incorrect
Unfortunately since i never use an all in one pack like XAMPP or similar program, i cant say much about it :(
I just want to ask you, when I ran Navicat and did the folder Mangos, it had errors, so I did continue with errors and it said successful, how bad was that? Also,what version is this for? (im not finished installing the patches). Thanks, this is a great guide, I started with emuchat.com's guide, but this is way better. : )
hey man i think ur guide is great!!!!!! how do i become a gm and make a few other of my friends gm's befor we advertise? (sorry i cant spell anything right lol)
thank you-
garris
Thanks Garris,
as for your question :
here's the tip from ChrisB (his method is easier compared to mine) lol
“create charname password” to make a new logon then “setgm charname 3″ use 3-6 for diff gm levels
ack i need some serious help
Plz if you have time lakewile@hotmail.com
I have no clue what to do
same problem.
how do i manually add an account???? i could really use an anwser
Reaper-X,
So far this is the best guide I have seen. Apparently it is important to smoke crack before making a WoW Private Server guide. There is even one idiot who wrote the how-to guide but admitted he never actually DID IT. Sounds like a man for sure...."I never did it myself but let me tell you how".
Could you produce the same guide except based upon the far superior Linux? :-D Its a shame to through away all that high performance and security on windows.
Reaper-X,
It's me again. If you want to write this out for Linux users, I am more than happy to help. You have my email address from this, right? I can send you another address.
Linux would seriously improve the WoW server. Perhaps allow 2x or more players concurrently. Probably less lag. Meanwhile using a less powerful computer. ;-)
Peace!
PROBLEM: Your guide is based upon the very old Apache 1.3. It is useless against the new Apache 2.2. There have been so many major changes. In fact, I am trying to find Apache 1.3 to download and it is not to be found.
Is there a guide update looming on the horizon? I really hate to come this far only to have a none accessible WoW server.
Hello Joel,
Sure i can do that (to be honest, actually i ran my own server on linux, CentOS) :) .. just wait im going to prepare for it
anyway if you're looking for the download address for HTTPD 1.3 under linux, you can get it from :
http://httpd.apache.org/download.cgi
as a side note, actually Apache 1.3 is not mean to be used on Win32 especially for production server, because (quoted from Apache Documentation) :
the older 1.3 series was never designed to run on Windows, but that support was 'hacked in', introducing a large number of potential thread saftey issues and other confirmed problems.
and as i said before, im going to prepare the new guide now ;)
sorry forgot to tell you this, currently i only have wow classic installed ... that means, if i created the guide for linux, it'll be based on WoW Classic
the process itself when compiling mangos, fetching mangos from it's svn repository is still the same, with the only differences lies in :
1. DBC files
2. Map files
extracted from your windows machine
because newer mangos revision for WoW TBC is using different maps version)
to the Genius (not sarcastic)
it took me a long time to do this but i got there in the end, well worth the satisfaction but now non of the in game GM comands will work i have set myself to gm status 6 so thats the highist but still get the command is not known, any ideas i know im using some real commands aswell, TY for the very nice guide and keep up the good work
I thought GM level went to 3...
na up to 6 3= games master 6 = game designer
ahhh ok, my bad, hey what revision of mangos and what SDB are you using?
add me to MSN mailto:kain@xierchien.com
using MaNGOS 4339 and SDMFULL-207-4344
/sigh
I wish I could play on a private server =(, but the MPQE part doesn't work. So now I just watch WoW Private Server videos on the YouTube... D=
Does it really go up to 6??
Hi
Very interesting information! Thanks!
G'night
I'm recently running 2.0.8, anyway to update the patches to a more recent version for ie. t6,BT,mercGlad, lootz ect?!?
woops wrong part : /
Went through all the steps; other than having to recognize that the drop tables command was not needed for a fresh install, things went flawlessly. Setting up a TBC private server is a snap with these excellent instructions. Thank you!
I'm anxiously awaiting the Apache 2.2.4 instructions, because I can't seem to get the http server to respond to anything. *sigh*
Can someone upload configured httpd file plz i very need
# Al
Hahaha well actually i put the drop tables to make sure that if mangos or realmd tables already installed before, it'll get dropped immediately
btw .. thanks for the suggestion, i'll update the guide with the httpd 2.2.6 (the current stable version for 2.2 series) :D
# Tiniux
Actually i can upload my httpd.conf file, but could you tell me did you get any error messages from your configuration ?
error messages actually no but in my config file are no AddModule Tables Server is working but not open localhost :|
I love this webpage XD
Thanks Tiniux, btw i just created a new guide for apache 2.2 (sample config included) as a respond to Al ;)
look at the trackback section or the recent post section at the right sidebar :)
Ok I have a question, what if just say you only want 1 or 2 people on, and you make the acct name yourself etc. Don't really need a registration page because I kinda want it for just a friend and myself. How do I just set it so that it's live and they can get on?
How can I edit my registration page?? help please....
Ah sorry looked over the lan page -_-, it was late. Awesome thanks for all the walkthroughs!
My friend has made a server and he can log in find, but I cant get in
It keeps on signing me in but whenever I create a character it punts me to the realmlist again
#Joel
Now I see that is the linux version.:(
When I try to net start apache 2.2, I get the following error message:
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
I have a feeling it may have to do with the fact that I cannot find an addmodule section in the http.conf.
Update:
I must have made a typo with the "net helpmsg 3547," because it says this:
A service specific error occurred: ***.
EXPLANATION
A service-specific error occurred.
ACTION
Refer to the Help or documentation for that service to determine the problem.
Well, fixed that problem, only to come upon a new problem during "net start apache."
The Apache service is starting.
The Apache service could not be started.
The service did not report an error.
More help is available by typing NET HELPMST 3534.
EDIT: "NET HELPMSG 3534"
all i found was apache 2.2.4 and for some reason theres no .conf file
i cant log on it says "unable to connect"
yo gm levels are actually 1-3 for me cuz moderator=1 game master=2 and administrator=3 and for gm commands in the game press enter type in .commands all the gm commands will pop up that are at you are able to use according to your gm level (p.s. i am using an older mangos thing for client 2.1.3 works great and higher versions connect succsessfully)
# elliott
No .conf file ? are you sure ? that files actually always be there or else the httpd process won't run at all
Any 1 manage to get the simple sign up working. Please if u have can u msn me at crighton35@msn.com.
I have been goin for hours changin shit and nothing seems to work. The server is fine, the DB is fine it all works, just cannot get signup working.
thanks in advance.
yeah me too, i really need this... everything is fine but i need a working reg page
so i set up the apache server and go to that localhost website, but what do i do now? What do i need to do to get my friends connected and what do they need to do?
I got the server up and working great, I need a working registration page for my site. Anyone got one? Feel free to contact me at Mistafreeze2009@hotmail.com.
I got everything running great..I dont know what to do now..I downloaded the registration page and inserted that and that comes up now when i type in http://localhost..Can someone point me in the right direction..thnks a bunch
The Apache service is starting.
The Apache service could not be started.
The service did not report an error.
More help is available by typing NET HELPMST 3534.
i seem to be having the same issue as Xyzy...
please and info on which direction to go
I got everything running, but the link to the sample reg page is not working. can you send me a link to a good one or email to me.
Just wanted to also say....AWSOME JOB....getting all this info out here for us.
Greatly appreciated.
I just wondered, if we make this on the internet, will our Normal WoW account be deleted? And how do we reset this server, i dont remember...
Hey, I see that you show us how to do this all, you helped me set up my other server and well I need help agian :(
Its about the port forwarding thing though. How do i forward ports, I went to my modem site 192.168.1.1 and then i logged in using username as admin (default) and pass as password ( default) then it asked me to make a real username and password, well i made it be eaxtly as the default and now i won't let me forward ports. I am using Verizon DSL modem modle westell 6100.
I looked all over fot the solution and well noone can help me on this. I called my internet service provider and now they want me to pay more then the original 100$ AMerican dollars we are already paying.
I came for server help here for last my resort, because i know your good at what you do.
But well now I am back. Please respond ASAP if you can, I have had like 50 e-mails from our server site saying they can't join the server registration page, says they don't have acess and so on (its because of my ports) then people can't log into my server (its because of my ports) I can play the server on Lan and on my computer but then others can't.
Please help. I know your the best and so I came to the best ( not to flatter you)
Reaper, i have 2 problems:
First is -(i do all things what you had written in tips) everything works before, but when i made Apache and PhP i want to test my server and there is error and i can't play. I run `realmd.exe` and `mangosd.exe` and on `mangosd.exe` it shows "(...) Check existing of map file 'D:/wow/Daemon/Mangos/maps/0004331.map' : not exist! Correct *.map files not found in patch 'D:/wow/Daemon/Mangos/maps' or *.vmap/*vmdir files in 'D/wow/Daemon/Mangos/vmaps'(...)"
Datadir is correct, maps too i think (THERE IS 0004331.map in /maps! and i used ad.exe again - same!)
Second is: i don't know how to make registration site (on Web) for my server (where people can register).
Please help me (i'm makeing server first time and i hope to play it soon ^^)
is this legal?
hey im sure you get this all the time lol, but im having hella time with setting up my private wow server, i have a web hosting for my site through http://www.aplus.net and am trying to work mysql and php database there, ive been playing with mysql and your newer newby freindly mango emulator and trying to get apache 1.3.39 installed. honestly im perty new to php coding in the first place with doing minor twinks on my forum. ive reasearched your tuts for hours on end now with my assistant admin and we are still stumped. ive registerd and am waiting to be in the forum. if you could e-mail me i can give you a lot more detailed info like my server and what not. ty for your time, and i might add, you are a GOD at this lol
Hi! i dunno if i can use a server like this can i? im not realy good at computer but im understand what stands but will i succes?
Reaper-X,
First off... I love the guide.. my server up and runnin on lan with help from no-ip i can access from lan or internet with no probs. I am trying to setup the test reg page. PHP and Apache work fine and the page loads it also writes to the MySQL db.... all except the password...? I used a 3rd party mavicat to view db... no password column i get the MySQL error: Unknown column 'password' in 'field list'. It appears as though it is encrypted and in column I. I could be wrong... any advise on where the password is stored or how i store it in datat base from php app via web
i am using
Mango 4875
apache 2.2
php 5
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
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','127.0.0.1','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 = "127.0.0.1";
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
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:
mysql_select_db('realmd');
$q = "insert into account ( username,password,gmlevel,sessionkey,joindate,banned,last_ip,failed_logins,locked,last_login,online) values ('$u','$p','0','',NOW(),'0','127.0.0.1','0','0','2000-01-01 00:00:00','0')";
Changed to:
mysql_select_db('realmd');
$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
Name:
<?php
$mysqlcon = mysql_connect("localhost","root","mypass");
mysql_select_db("mangos",$mysqlcon);
$mysqlres = mysql_query("SELECT `name`,`guid`,`class` FROM `character` where `online` = 1");
while (($thisuser = mysql_fetch_array($mysqlres))) {
echo '';
printf("%s",$thisuser['name']);
echo '';
}
?>
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
P.S. These posts were referring probs encountered trying to get the simple registration page to work.
It was provided up at the top of the page, step 4, below Requirements ie:
http://mangos-files.de/index.php?show=misc&num=1
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:
(id,username,I,gmlevel,sessionkey,v,s,email,joindate,last_ip,failed_logins,locked,last_login,online,tbc,mutetime,locale)
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.
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.
Thanks
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:
Name:
<?php
$mysqlcon = mysql_connect("127.0.0.1","root","mypass");
mysql_select_db("mangos",$mysqlcon);
$mysqlres = mysql_query("SELECT `name`,`guid`,`class` FROM `character` where `online` = 1");
while (($thisuser = mysql_fetch_array($mysqlres))) {
echo '';
printf("%s",$thisuser['name']);
echo '';
}
?>
*** Should read:
Players Currently Online
Name:
<?php
$mysqlcon = mysql_connect("127.0.0.1","root","mypass");
mysql_select_db("characters",$mysqlcon);
$mysqlres = mysql_query("SELECT `name`,`guid`,`class` FROM `character` where `online` = 1");
while (($thisuser = mysql_fetch_array($mysqlres))) {
echo '';
printf("%s",$thisuser['name']);
echo '';
}
?>
or something there about...
****
** big change was:
mysql_select_db("characters",$mysqlcon);
everything else was cosmetic for my site, from what I remember...
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);
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')");
ahh man.. add the ; and anything else I missed, thanks... sorry, tired... cya
just wondering if someone can post a full php script for users login and register page would be helpfull thanks so much
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..
Termigator
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.
Termigator
Ok, I know there is a way to post stuff in a
So I'm putting it on fileplanet at
http://www.fileplanet.com/files/180000/184448.shtml
may be up in a few days...
and at
[URL]http://myfreefilehosting.com/f/a763abeade_0.1MB[/URL]
that second address is already up and hosting the index.zip.
It's:
http://myfreefilehosting.com/f/a763abeade_0.1MB
Could some one help me, i cant seem to fined reaper-x registration page for my own web page.
thx if anyone can help