Conquer Site

06/28/2011 01:58 alex4war#31
Sorry for this question but where in class.account.php do i have to edit it? xD

really sorry but im a noob at .php



And i got still this above the register page :
Quote:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\AppServ\www\conquer2\index.php:80) in C:\AppServ\www\conquer2\classes\class.account.php on line 2
06/28/2011 02:05 BioHazarxPaul#32
remove the session_start, seams its already starting somewhere else, and its in the function CreateAccountConquer()
06/28/2011 02:23 alex4war#33
when i edit the code to function createaccountconquer i get error. can u exactly say what i have to do to get this site work in 12Talis?

Thnx

Edit: I fixed the Warnings at register and change pass. u have to put this code under <?php: session_start() in the index.php so put session_start() at line 2

and now when i try to register it says thanx but in my mysql database theres nothing?
06/28/2011 02:35 BioHazarxPaul#34
your tables and rows dont match up then im guessing
PHP Code:
$ins_m $this->conn->prepare("INSERT INTO accounts (username,
                                                                                 password,
                                                                                 email,
                                                                                 question,
                                                                                 answer,
                                                                                 idnumber)
                                                                         VALUES (:username,
                                                                                 :password,
                                                                                 :email,
                                                                                 :question,
                                                                                 :answer,
                                                                                 :idnumber)"
);
                            
                            
$ins_m->bindParam(':username'$this->usernamePDO::PARAM_STR16);
                            
$ins_m->bindParam(':password'$this->passwordPDO::PARAM_STR16);
                            
$ins_m->bindParam(':email',    $this->email);
                            
$ins_m->bindParam(':question'$this->question);
                            
$ins_m->bindParam(':answer'$this->answer);
                            
$ins_m->bindParam(':idnumber'$this->securitycodePDO::PARAM_INT16);
                            
$ins_m->execute(); 
06/28/2011 02:51 alex4war#35
well i have that code in createaccountconquer still doesnt work.

Quote:
function CreateAccountConquer(){
if(CAPTCHA::checkCaptchaCode($_POST['captcha_code']) == TRUE):
if(isset($this->validate) && $this->validate == 'register'):
if($this->checkAccountType == 'mysql'):
if($this->question != 'disabledoption'):
// Open MySQL Connection
$this->OpenConnection();
$check = $this->conn->query("SELECT * FROM accounts WHERE username = '".$this->username."'");

if($check->fetch(PDO::FETCH_NUM) != 0):
echo $this->message("Unevaluated Account!");
else:
$ins_m = $this->conn->prepare("INSERT INTO accounts (username, password, email, question, answer, idnumber) VALUES (:username, :password, :email, :question, :answer, :idnumber)");

$ins_m->bindParam(':username', $this->username, PDO::PARAM_STR, 16);
$ins_m->bindParam(':password', $this->password, PDO::PARAM_STR, 16);
$ins_m->bindParam(':email', $this->email);
$ins_m->bindParam(':question', $this->question);
$ins_m->bindParam(':answer', $this->answer);
$ins_m->bindParam(':idnumber', $this->securitycode, PDO::PARAM_INT, 16);
$ins_m->execute();

if($ins_m->rowCount() > 0):
echo $this->message("Thank you for registering.");
else:
echo $this->message("Error in Creating account please try again!");
endif;
endif;
else:
echo $this->message('You must fill in your select question');
endif;
elseif($this->checkAccountType == 'files'):
if($this->question != 'disabledoption'):
if(!file_exists($this->fullpath)):
$file = scandir($this->path_accounts);
$UID = count($file)+999998;

$Data = "[Account]".EL;
$Data .= "Username=".$this->username.EL;
$Data .= "Password=".$this->password.EL;
$Data .= "Banned=0".EL;
$Data .= "LastIP=".$_SERVER['REMOTE_ADDR'].EL;
$Data .= "[Character]".EL;
$Data .= "Name=INVALIDNAME".EL;
$Data .= "UID=".$UID.EL;
$Data .= "[PersonalInfo]".EL;
$Data .= "Email=".$this->email.EL;
$Data .= "Realname=".$this->realname.EL;
$Data .= "SecurityCode=".$this->securitycode.EL;
$Data .= "Question=".$this->question.EL;
$Data .= "Answer=".$this->answer.EL;

file_put_contents($this->fullpath, $Data);

if(file_exists($this->fullpath)):
echo $this->message('Thank you for registering.');
else:
echo $this->message('Error in Creating account please try again!');
endif;
else:
echo $this->message('Account '.$this->username.' is already in use.');
endif;
else:
echo $this->message('You must fill in your select question');
endif;
endif;
endif;
endif;
}
thats the whole code. and now?

But a weird thing. i tried to make some accs and they are not in my accounts db. but i got the .ini files in my D:\...\AuthServer\Database directory xD i need them in my database xD
06/28/2011 04:14 BioHazarxPaul#36
public $checkAccountType = 'files'; i really hope u changed that as explained on the 1st page
06/28/2011 12:50 alex4war#37
yea

Quote:
/*
* Check type of server used to create accounts.
* -- --------------------------------------------------------------------
* $checkAccountType: mysql - Use mysql database.
* $checkAccountType: files - Use files .ini as a database.
-- If you use files (.ini) as a database, go to (modules/register.php)
and remove the comment involving (realname), lines 42 to 46.
*/
public $checkAccountType = 'files';

public $args = array();
public $maxAllowLoggedAccounts = 800;

function OpenConnection(){
try{
$this->conn = new PDO("mysql:host=".$this->ip.";dbname=".$this->coMysqlDb."", $this->coMysqlUser, $this->coMysqlPass);
}catch(PDOException $e){
echo $e->getMessage();
}
}
thats it.

when i change public $checkAccountType = 'files'; files into mysql i dont see the page only the background.
06/28/2011 17:52 BioHazarxPaul#38
then you have some issues because that needs to be changed into mysql in order to use the 12tails, i believe its mysql not flatefile database..
06/28/2011 18:30 alex4war#39
so what to do?
06/28/2011 19:10 petje1#40
Quote:
Originally Posted by alex4war View Post
yea



thats it.

when i change public $checkAccountType = 'files'; files into mysql i dont see the page only the background.
i had that to, i though you had to write Mysql or something like that. i forgot how'd i fixed that xD
06/28/2011 19:28 alex4war#41
petje1? are u dutch?
06/28/2011 19:28 petje1#42
Yup
06/28/2011 19:31 alex4war#43
ok^^


buttt does anyone know how to fix this?
06/28/2011 19:59 petje1#44
Quote:
Originally Posted by petje1 View Post
edit:

when i use mysql, it doesn't give any error, or confirmation.
What should i do?
As you can see i've asked for help but this is where i've got stuck
06/29/2011 19:20 BioHazarxPaul#45
okay after doing the basic's settings it asked for and getting spammed with different errors I wouldn't even take my time to figure out the issue, I would just find a different reg page and over write the current one in modules.