RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[RunUO 2.0 RC1] Complete Automated Web Accounting Service 1.0

Vorspire

Knight
Run this MySQL 4 query in PhPMyAdmin, to add the 'accounts' table to your chosen database:

Code:
CREATE TABLE IF NOT EXISTS accounts (
  `name` text NOT NULL,
  `password` text NOT NULL,
  `email` text NOT NULL,
  phase int(5) NOT NULL default '0'
) TYPE=MyISAM;
 

Shadow_Storm

Wanderer
Great job, I will test this tomorrow, I been trying to learn php and mysql cause i wanted to do somthing similar to this. Agai thanks and great job I will let you knnow if i ran inot any problem tomorrow ;)
 

Vorspire

Knight
It will work anywhere, as long as all requirements are met :)

I forgot to mention that you will need to create an "accounts" table in MySQL with the rows:

(text)"name"(255), (text)"password"(255), (text)"email"(255) and (int)"phase"(3)

in THAT order :)

i will update the readme later.


Also, if anyone has the system running, please post me a URL so i can see it myself :)
 

Pyro-Tech

Knight
i know some things had problems with working on two seperate machines....

i pay for hosting and what not, so im just wondering how hard this will be to set up to send the stuff to my computer to update and all

i dunno if im making sense :p

but thanks....ill look into it :)
 

Vorspire

Knight
its very easy, thats what the odbc driver is for. make sure both machines have it installed.. setup should be very easy :p
 

Shadow_Storm

Wanderer
Admin Vorspire, This is a hard thing for me to explain because of my low english but I am going to give it a try. I was able to get everything to compile correctly, however, their is some minore problem with php scripts that I was able to fix. FYI When you need to comment somthing in php remember to use /* "comment"*/ becasue php is ignoring <!--!> this type .

I change the comments but I am still having issues, some characters PHP has a problem translating. I was able to fix most of them by addin \ before the letter that it was seen as a veriable and that fix the problem but now I am stuck on the lastone. I am not sure where you define the function that is looking for, I will look inot your scrip some more maybe i can figure it out.

Code:
Notice: Undefined variable: e in c:\Inetpub\wwwroot\WAConfig.php on line 11

Notice: Undefined variable: a in c:\Inetpub\wwwroot\WAConfig.php on line 11

Notice: Undefined variable: IP in c:\Inetpub\wwwroot\WAConfig.php on line 11

Notice: Undefined variable: a in c:\Inetpub\wwwroot\WAConfig.php on line 16

Notice: Undefined variable: crypt_email in c:\Inetpub\wwwroot\WAConfig.php on line 16

Notice: Undefined variable: a in c:\Inetpub\wwwroot\WAConfig.php on line 16

Notice: Undefined variable: e in c:\Inetpub\wwwroot\WAConfig.php on line 16

Notice: Undefined variable: crypt_query in c:\Inetpub\wwwroot\WAConfig.php on line 22

Notice: Undefined variable: query in c:\Inetpub\wwwroot\WAConfig.php on line 22

Notice: Undefined variable: a in c:\Inetpub\wwwroot\WAConfig.php on line 27

Notice: Undefined variable: crypt_email in c:\Inetpub\wwwroot\WAConfig.php on line 27

Notice: Undefined variable: a in c:\Inetpub\wwwroot\WAConfig.php on line 27

Notice: Undefined variable: e in c:\Inetpub\wwwroot\WAConfig.php on line 27

[COLOR="Red"]Fatal error: Call to undefined function mysql_connect() in c:\Inetpub\wwwroot\WAConfig.php on line 41[/COLOR]

This is the php file
PHP:
<?PHP

/*<!- General Information Section -!>*/

$WebURL = "http://kingdomofshadows.game-server.cc"; /*<!- Keep http:// (keep this the same path as this file)-!>*/
$AdminEmailAddress = "[email protected]";

/*<!- Requesting Accounts Admin Notification Section -!>*/

$EmailSubjectAdmin = "Kingdom of Shadows - Someone requested an account!";
$EmailMessageAdmin = "Someone is requesting an account!\n\nThis email is for information purposes only!\n\nDetails of request sender:\n\nEmail: \$e\nAccount: \$a\nLogged IP: \$IP";

/*<!- Requesting Accounts Section -!>*/

$EmailSubject1 = "Kingdom of Shadows - Account Request!";
$EmailMessage1 = "Hi,\nYou are trying to register the account:\n\$a\nPlease visit\n$WebURL/VerifyRequestAccount.php&v=\$crypt_email&ac=\$a&em=\$e\nin order to verify your new account request!";;


/*<!- Lost Password Section -!>*/

$EmailSubject2 = "Kingdom of Shadows - Lost Password!";
$EmailMessage2 = "Hi,\n\nPlease visit\n$WebURL/VerifyLostPW.php&verify=\$crypt_query&email=\$query\nin order to verify your lost password request.";

/*<!- Lost Password Section -!>*/

$EmailSubject3 = "Kingdom of Shadows - Change Account Email!";
$EmailMessage3 = "Hi,\nYou are trying to register this email address for the account:\n\n\$a\n\nPlease visit\n$WebURL/VerifyChangeEmail.php&verify=\$crypt_email&account=\$a&email=\$e\nin order to verify your new email request!";

/*<!- MySQL Database Setup Section -!>*/

$link=connectmysql();
function connectmysql() {

  $mysql_host = "Database Host";
  $mysql_user = "Database User";
  $mysql_pass = "Database Password";
  $db_name = "Database Name";

/*<!- DO NOT EDIT PAST HERE! -!>*/

  $link = mysql_connect($mysql_host,$mysql_user,$mysql_pass) or die ("Could not connect to mySQL daemon<br>\n");
  mysql_select_db($db_name);
  return $link;
  }
  
  ?>
 

Pyro-Tech

Knight
Admin Vorspire said:
its very easy, thats what the odbc driver is for. make sure both machines have it installed.. setup should be very easy :p

is there anything specific i need to ask my webhost to see if they have it installed?
 

Vorspire

Knight
Just ask about ODBC, thats all. ODBC is a driver that lets users connect from other locations securely.

I have actually updated the package with the correct php file. The problem was because i didn't have sufficient hosting to test the code ;)
 

Shadow_Storm

Wanderer
I updated the files and still getting an error
Code:
Fatal error: Call to undefined function mysql_connect() in c:\Inetpub\wwwroot\WAConfig.php on line 22

The part mark in with ** is line 22

PHP:
?>
<!- Lost Password Section -!>**
<?PHP

$EmailSubject2 = "Kingdom of Shadows - Lost Password!";
$EmailMessage2 = "Hi,\n\nPlease visit\n$WebURL/VerifyLostPW.php&verify=$crypt_query&email=$query\nin order to verify your lost password request.";
I change the <!- -!> comments and replace them with /* */ that took care of that problem but now this
Code:
Notice: Undefined variable: e in c:\Inetpub\wwwroot\WAConfig.php on line 12

Notice: Undefined variable: a in c:\Inetpub\wwwroot\WAConfig.php on line 12

Notice: Undefined variable: IP in c:\Inetpub\wwwroot\WAConfig.php on line 12

Notice: Undefined variable: a in c:\Inetpub\wwwroot\WAConfig.php on line 19

Notice: Undefined variable: crypt_email in c:\Inetpub\wwwroot\WAConfig.php on line 19

Notice: Undefined variable: a in c:\Inetpub\wwwroot\WAConfig.php on line 19

Notice: Undefined variable: e in c:\Inetpub\wwwroot\WAConfig.php on line 19

Notice: Undefined variable: crypt_query in c:\Inetpub\wwwroot\WAConfig.php on line 26

Notice: Undefined variable: query in c:\Inetpub\wwwroot\WAConfig.php on line 26

Notice: Undefined variable: a in c:\Inetpub\wwwroot\WAConfig.php on line 33

Notice: Undefined variable: crypt_email in c:\Inetpub\wwwroot\WAConfig.php on line 33

Notice: Undefined variable: a in c:\Inetpub\wwwroot\WAConfig.php on line 33

Notice: Undefined variable: e in c:\Inetpub\wwwroot\WAConfig.php on line 33

Fatal error: Call to undefined function mysql_connect() in c:\Inetpub\wwwroot\WAConfig.php on line 51
 

Shadow_Storm

Wanderer
well I been playing with the php pages trying to fix my problem. Now I am getting the following message on 3 of the php files that came in the zip files. RquestAccount.php, LostPW.php, and ChangeE-mail. I have no idea how to fix this :(
Code:
CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers.



and on the the last 3 i am getting this
Code:
Notice: Undefined variable: email in c:\Inetpub\wwwroot\verifychangeemail.php on line 1

Notice: Undefined variable: verify in c:\Inetpub\wwwroot\verifychangeemail.php on line 1
Invalid verification code! 

Notice: Undefined variable: email in c:\Inetpub\wwwroot\verifylostPW.php on line 1

Notice: Undefined variable: verify in c:\Inetpub\wwwroot\verifylostPW.php on line 1
Invalid verification code! 

Notice: Undefined variable: em in c:\Inetpub\wwwroot\verifyrequestaccount.php on line 1

Notice: Undefined variable: v in c:\Inetpub\wwwroot\verifyrequestaccount.php on line 1
Invalid verification code!
 

Vorspire

Knight
The pages seemed to work fine for me, however you should check that the custom variables are correctly set in connectmysql() in WAConfig.php

don't forget to end the input line with ;
 

Shadow_Storm

Wanderer
Well I found a problem with my server for some reason IIS and PHP had some issues, so I just finish redoing my webs server today. I install apache this time and everything looks good so I am going to try your system again. I think part of the problem was some kind of bug between IIS and PHP that I could not find a work around.

I will let you know if things work sometime tomorrow ;)
 

Shadow_Storm

Wanderer
I installed your files again to give it another try and I am still having problems. I was wondering where you are defining your variables, because most of the warning I have is because undefined variables. I think if I can define this variables my problems will be fix.

FYI I know that php, mysql and apache are configure correct, I’ve spend the past two days installing and testing my new web server to makes sure that I did not have the same issues as with my old server that had some issues.

My old sever sometimes would not be able to open some files with the extension php it would error out, I found it was an issue with IIS and PHP that I could not find a workaround. So I decide to install apache to replace IIS. Anyhow, this is getting out of the subject. If could please point out where do I need to define this variables I’ll appreciate it.


This is the errors I am getting:


PHP:
Notice: Undefined variable: e in c:\MyWeb\WAConfig.php on line 4

Notice: Undefined variable: a in c:\MyWeb\WAConfig.php on line 4

Notice: Undefined variable: IP in c:\MyWeb\WAConfig.php on line 4

Notice: Undefined variable: a in c:\MyWeb\WAConfig.php on line 6

Notice: Undefined variable: crypt_email in c:\MyWeb\WAConfig.php on line 6

Notice: Undefined variable: a in c:\MyWeb\WAConfig.php on line 6

Notice: Undefined variable: e in c:\MyWeb\WAConfig.php on line 6

Notice: Undefined variable: crypt_query in c:\MyWeb\WAConfig.php on line 8

Notice: Undefined variable: query in c:\MyWeb\WAConfig.php on line 8

Notice: Undefined variable: a in c:\MyWeb\WAConfig.php on line 10

Notice: Undefined variable: crypt_email in c:\MyWeb\WAConfig.php on line 10

Notice: Undefined variable: a in c:\MyWeb\WAConfig.php on line 10

Notice: Undefined variable: e in c:\MyWeb\WAConfig.php on line 10

Notice: Undefined variable: REMOTE_ADDR in c:\MyWeb\requestaccount.php on line 4
:: Logged IP: ::


Notice: Undefined variable: p in c:\MyWeb\requestaccount.php on line 8

Notice: Undefined variable: qemail2 in c:\MyWeb\requestaccount.php on line 14

Notice: Undefined variable: qemail in c:\MyWeb\requestaccount.php on line 14

Notice: Undefined variable: accname in c:\MyWeb\requestaccount.php on line 21

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in c:\MyWeb\requestaccount.php on line 23

Notice: Undefined variable: email in c:\MyWeb\requestaccount.php on line 30

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in c:\MyWeb\requestaccount.php on line 32

Notice: Undefined variable: email in c:\MyWeb\requestaccount.php on line 39

Notice: Undefined variable: accname in c:\MyWeb\requestaccount.php on line 39

Notice: Undefined variable: REMOTE_ADDR in c:\MyWeb\requestaccount.php on line 39

Notice: Undefined variable: EmailSubject1 in c:\MyWeb\requestaccount.php on line 45

Notice: Undefined variable: EmailMessage1 in c:\MyWeb\requestaccount.php on line 45

Notice: Undefined variable: AdminEmailAddress in c:\MyWeb\requestaccount.php on line 45

Warning: mail() [function.mail]: SMTP server response: 503 need RCPT command [data] in c:\MyWeb\requestaccount.php on line 45

Notice: Undefined variable: AdminEmailAddress in c:\MyWeb\requestaccount.php on line 47

Notice: Undefined variable: EmailSubjectAdmin in c:\MyWeb\requestaccount.php on line 47

Notice: Undefined variable: EmailMessageAdmin in c:\MyWeb\requestaccount.php on line 47

Notice: Undefined variable: AdminEmailAddress in c:\MyWeb\requestaccount.php on line 47

Warning: mail() [function.mail]: SMTP server response: 503 need RCPT command [data] in c:\MyWeb\requestaccount.php on line 47
The email has been sent with the information to activate your account!
Please take the time to read it all carefuly!
Remember to check your Junk-Mail folder too!
 

Vorspire

Knight
do not rename the distributed files or you're going to cuase errors for yourself...

Keep it as WAConfig.php and change your options in that file only, do not edit the other php files!

Make sure the WA System files are all located in the same folder on your web server, and define the path to the files in WAConfig.php ($WebURL)
 

Shadow_Storm

Wanderer
The files are still under the same name. I might be missing something in the WAConfig.php file that I have not edit. just to make sure ill include that file here for you to see and myabe you can see if I am missing somthing.
PHP:
<!- General Information Section -!>
<?PHP

$WebURL = "http://kingdomofshadows.game-server.cc"; ?><!- Keep http:// (keep this the same path as this file)-!><?
$AdminEmailAddress = "[email protected]";

?>
<!- Requesting Accounts Admin Notification Section -!>
<?PHP

$EmailSubjectAdmin = "Kingdom of Shadows - Someone requested an account!";
$EmailMessageAdmin = "Someone is requesting an account!\n\nThis email is for information purposes only!\n\nDetails of request sender:\n\nEmail: $e\nAccount: $a\nLogged IP: $IP";

?>
<!- Requesting Accounts Section -!>
<?PHP

$EmailSubject1 = "Kingdom of Shadows - Account Request!";
$EmailMessage1 = "Hi,\nYou are trying to register the account:\n$a\nPlease visit\n$WebURL/VerifyRequestAccount.php&v=$crypt_email&ac=$a&em=$e\nin order to verify your new account request!";;

?>
<!- Lost Password Section -!>
<?PHP

$EmailSubject2 = "Kingdom of Shadows - Lost Password!";
$EmailMessage2 = "Hi,\n\nPlease visit\n$WebURL/VerifyLostPW.php&verify=$crypt_query&email=$query\nin order to verify your lost password request.";

?>
<!- Lost Password Section -!>
<?PHP

$EmailSubject3 = "Kingdom of Shadows - Change Account Email!";
$EmailMessage3 = "Hi,\nYou are trying to register this email address for the account:\n\n$a\n\nPlease visit\n$WebURL/VerifyChangeEmail.php&verify=$crypt_email&account=$a&email=$e\nin order to verify your new email request!";

?>
<!- MySQL Database Setup Section -!>
<?PHP

$link=connectmysql();
function connectmysql() {

  $mysql_host = "localhost";
  $mysql_user = "webadm";
  $mysql_pass = "w3b@dm";
  $db_name = "contacts";

?>
<!- DO NOT EDIT PAST HERE! -!>
<?PHP

  $link = mysql_connect($mysql_host,$mysql_user,$mysql_pass) or die ("Could not connect to mySQL daemon<br>\n");
  mysql_select_db($db_name);
  return $link;
  }
  
  ?>
 

Vorspire

Knight
The file seems fine as it is, don't see any problems there..

Please make sure your web host provider meets the requirements in the README.txt

ODBC, register_globals = 1;

etc...
 
Top