Register for your free account! | Forgot your password?

You last visited: Today at 03:42

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Conquer Site

Discussion on Conquer Site within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old 06/28/2011, 01:58   #31
 
elite*gold: 0
Join Date: Jul 2008
Posts: 98
Received Thanks: 6
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
alex4war is offline  
Old 06/28/2011, 02:05   #32
 
BioHazarxPaul's Avatar
 
elite*gold: 0
Join Date: Nov 2005
Posts: 548
Received Thanks: 93
remove the session_start, seams its already starting somewhere else, and its in the function CreateAccountConquer()
BioHazarxPaul is offline  
Old 06/28/2011, 02:23   #33
 
elite*gold: 0
Join Date: Jul 2008
Posts: 98
Received Thanks: 6
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?
alex4war is offline  
Old 06/28/2011, 02:35   #34
 
BioHazarxPaul's Avatar
 
elite*gold: 0
Join Date: Nov 2005
Posts: 548
Received Thanks: 93
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(); 
BioHazarxPaul is offline  
Old 06/28/2011, 02:51   #35
 
elite*gold: 0
Join Date: Jul 2008
Posts: 98
Received Thanks: 6
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, assword, :email, :question, :answer, :idnumber)");

$ins_m->bindParam(':username', $this->username, PDO::PARAM_STR, 16);
$ins_m->bindParam('assword', $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
alex4war is offline  
Old 06/28/2011, 04:14   #36
 
BioHazarxPaul's Avatar
 
elite*gold: 0
Join Date: Nov 2005
Posts: 548
Received Thanks: 93
public $checkAccountType = 'files'; i really hope u changed that as explained on the 1st page
BioHazarxPaul is offline  
Old 06/28/2011, 12:50   #37
 
elite*gold: 0
Join Date: Jul 2008
Posts: 98
Received Thanks: 6
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.
alex4war is offline  
Old 06/28/2011, 17:52   #38
 
BioHazarxPaul's Avatar
 
elite*gold: 0
Join Date: Nov 2005
Posts: 548
Received Thanks: 93
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..
BioHazarxPaul is offline  
Old 06/28/2011, 18:30   #39
 
elite*gold: 0
Join Date: Jul 2008
Posts: 98
Received Thanks: 6
so what to do?
alex4war is offline  
Old 06/28/2011, 19:10   #40
 
elite*gold: 0
Join Date: Jan 2009
Posts: 74
Received Thanks: 3
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
petje1 is offline  
Old 06/28/2011, 19:28   #41
 
elite*gold: 0
Join Date: Jul 2008
Posts: 98
Received Thanks: 6
petje1? are u dutch?
alex4war is offline  
Old 06/28/2011, 19:28   #42
 
elite*gold: 0
Join Date: Jan 2009
Posts: 74
Received Thanks: 3
Yup
petje1 is offline  
Old 06/28/2011, 19:31   #43
 
elite*gold: 0
Join Date: Jul 2008
Posts: 98
Received Thanks: 6
ok^^


buttt does anyone know how to fix this?
alex4war is offline  
Old 06/28/2011, 19:59   #44
 
elite*gold: 0
Join Date: Jan 2009
Posts: 74
Received Thanks: 3
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
petje1 is offline  
Old 06/29/2011, 19:20   #45
 
BioHazarxPaul's Avatar
 
elite*gold: 0
Join Date: Nov 2005
Posts: 548
Received Thanks: 93
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.
BioHazarxPaul is offline  
Reply

Tags
conquer, conquer site, site, web


Similar Threads Similar Threads
Starting my own Conquer site...
06/02/2010 - CO2 Programming - 0 Replies
Starting with packet structs, and working through memory functions later. Will also have tutorials and some example classes for different languages on how to do some things. Main Page (Conquer Online Documentation)
conquer v2 new site + server is on soon
02/18/2009 - CO2 Private Server - 11 Replies
heey people conquer v2 has an new site join it today website Link here server will be up soon join today and become vip. fully translated server every bug fixed from patch 5065 when we got mor players we will update is to an higher patch.. our site has chatbox reg page etc new style look for yourself p.s dont flame this topic
all script site conquer
12/21/2007 - Conquer Online 2 - 8 Replies
hi all



All times are GMT +2. The time now is 03:42.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.