Posts: 9
Threads: 1
Joined: Apr 2013
Reputation:
0
THT Version: 1.3.5 Reworked
Your THT installation URL: /home/admin/example.com/client
Browser (including version): Chrome 26
Your Operating System: Windows 8
Server's Operating System: CentOS 5 32 bit
Apache Version: 2.2.23
Control Panel Type: Kloxo
Control Panel Version: 6.1.12 Stable
Error: Stuck at step 5 during user/order registration
Problem: ^
I made sure curl_exec was removed from the disabled list in php.ini
Both in the /home/httpd/example.com/php.ini, and /etc/php.ini
Also made sure it was removed in the Kloxo php config settings in the admin panel.
Php info also said it was enabled.
Increased $timeout value from 5 to 15 in kloxo.php in /includes/servers/
Is there anything else I'm missing?
Posts: 198
Threads: 12
Joined: Oct 2011
Reputation:
11
What does the problem state exactly? Does it take forever to create the account (the endless progressbar issue)? Was the account ever created on the server? Have you set the CORRECT port to connect to Kloxo? What is the port to connect to Kloxo? And is there a firewall on your server?
Posts: 9
Threads: 1
Joined: Apr 2013
Reputation:
0
04-02-2013, 10:01 AM
(This post was last modified: 04-02-2013, 10:05 AM by teohkay.)
The error states this: An error has occurred. Please inform your system administrator.
The account never gets created on the server, I've set all the ports to connect to Kloxo correctly already (7778). My port to connect is 7778. No firewall.
Posts: 198
Threads: 12
Joined: Oct 2011
Reputation:
11
Mhm. You are using the Reworked Edition, which has AutoMod in it, and Naven (creator of the Reworked Edition) modified my Kloxo plugin to work on his. As far as that goes, I do not know how he does it. I'll try to help the best I can, but I suggest you use the official version of THT and the official version of the Kloxo plugin.
As for the following, it really looks like an error with THT than with the plugin. A javascript or server-side error perhaps? I don't really know. Sorry.
Posts: 9
Threads: 1
Joined: Apr 2013
Reputation:
0
(04-02-2013, 10:07 AM)Liam D. Wrote: Mhm. You are using the Reworked Edition, which has AutoMod in it, and Naven (creator of the Reworked Edition) modified my Kloxo plugin to work on his. As far as that goes, I do not know how he does it. I'll try to help the best I can, but I suggest you use the official version of THT and the official version of the Kloxo plugin.
As for the following, it really looks like an error with THT than with the plugin. A javascript or server-side error perhaps? I don't really know. Sorry.
Somehow some other people just seemed to get it to work. Hmm, in Kloxo.php for "public $dnstemplate = "default.dnst";"
should I let it remain like that or change it to the one I'm using when setting up the server in THT?
Posts: 198
Threads: 12
Joined: Oct 2011
Reputation:
11
You should change that to the one you use as the DNS Template in kloxo. Keep in mind that the name will have .dnst at the end.
For example, if you set a DNS Template with a name of "tht" then its value should be tht.dnst
Posts: 9
Threads: 1
Joined: Apr 2013
Reputation:
0
(04-02-2013, 10:15 AM)Liam D. Wrote: You should change that to the one you use as the DNS Template in kloxo. Keep in mind that the name will have .dnst at the end.
For example, if you set a DNS Template with a name of "tht" then its value should be tht.dnst
Changed it, but I see no difference, still after the progress bar I get the error again. Are there any other steps I should look at? I might not have configured kloxo.php correctly since the only change I made was the DNS one.
Posts: 198
Threads: 12
Joined: Oct 2011
Reputation:
11
Can you copy-paste your kloxo.php file here?
Posts: 9
Threads: 1
Joined: Apr 2013
Reputation:
0
Code: <?php
/**
* TheHostingTool :: Kloxo Server Class
* Created by Liam Demafelix (c) 2012
* http://www.pinoytechie.net/
* Kloxo Class Version 1.2.2 - March 13, 2012
**/
class kloxo {
public $name = "Kloxo";
public $hash = false;
public $ns_tmpl = true;
public $has_welcome = true;
public $canupgrade = true;
private $port = 7778;
private $sport = 7777;
public $dnstemplate = "hosts.dnst";
# Should Kloxo send a welcome e-mail?
private $welcome_email = true;
private $server;
public function __construct($serverId = null) {
global $db, $main;
if(!is_null($serverId)) {
$this->server = (int)$serverId;
$server_details = $this->serverDetails($this->server);
}else{
$pid = $main->getvar['package']; //For the admin page.
if(is_numeric($pid)){
$serv_query = $db->query("SELECT * FROM <PRE>packages WHERE id = '".$pid."' LIMIT 1");
$serv_data = $db->fetch_array($serv_query);
$this->server = $serv_data['server'];
$server_details = $this->serverDetails($this->server);
}
}
if($server_details['dnstemplate']){
$this->dnstemplate = $server_details['dnstemplate'];
}
$this->welcome_email = $server_details['welcome'];
}
private function serverDetails($server) {
global $db;
global $main;
$query = $db->query("SELECT * FROM `<PRE>servers` WHERE `id` = '{$db->strip($server)}'");
if($db->num_rows($query) == 0) {
$array['Error'] = "That server doesn't exist!";
$array['Server ID'] = $id;
$main->error($array);
return;
}
else {
return $db->fetch_array($query);
}
}
private function remote($action, $test = 0) {
global $db;
$data = $this->serverDetails($this->server);
$ip = gethostbyname($data['host']);
// Connect
/** As per THT team recommendation (by Kevin), this plugin now uses cURL to connect **/
$ch = curl_init();
$timeout = 15;
if($db->config("whm-ssl") == 1) {
$serverstuff = "https://" . $data['host'] . ":" . $this->sport . "/webcommand.php?login-class=auxiliary&login-name=" . $data['user'] . "&login-password=" . $data['accesshash'] . "&" . $action;
curl_setopt($ch, CURLOPT_URL, $serverstuff);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
}
else {
$serverstuff = "http://" . $data['host'] . ":" . $this->port . "/webcommand.php?login-class=auxiliary&login-name=" . $data['user'] . "&login-password=" . $data['accesshash'] . "&" . $action;
curl_setopt($ch, CURLOPT_URL, $serverstuff);
}
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($ch);
curl_close($ch);
// Parse Data
$data = htmlentities($data);
// End
if(!$test){
if(strpos($data, "success") != false) {
return true;
}
else {
return false;
}
}else{
if($data != "_error_login_error") {
return true;
}
else {
return false;
}
}
}
public function GenUsername() {
$t = rand(5,8);
for ($digit = 0; $digit < $t; $digit++) {
$r = rand(0,1);
$c = ($r==0)? rand(65,90) : rand(97,122);
$user .= chr($c);
}
return $user;
}
public function GenPassword() {
for ($digit = 0; $digit < 5; $digit++) {
$r = rand(0,1);
$c = ($r==0)? rand(65,90) : rand(97,122);
$passwd .= chr($c);
}
return $passwd;
}
public function signup($server, $reseller, $user = '', $email = '', $pass = '') {
global $main;
global $db;
if ($user == '') { $user = $main->getvar['username']; }
if ($email == '') { $email = $main->getvar['email']; }
if ($pass == '') { $pass = $main->getvar['password']; }
$this->server = $server;
$data = $this->serverDetails($this->server);
$ip = gethostbyname($data['host']);
/**
* As of Version 1.2.2 : Perform Validation Checks on Variables
**/
$user = trim(stripslashes($main->getvar['username']));
$email = trim(stripslashes($main->getvar['email']));
$pass = trim(stripslashes($main->getvar['password']));
$package = $main->getvar['fplan'];
$package = str_replace(" ", "", $package);
/**
* As of Version 1.2.2 : Kloxo Welcome E-Mail Configuration
**/
if($this->welcome_email) {
$send_email_kloxo = "on";
} else {
$send_email_kloxo = "off";
}
$string = "action=add&class=client&name=". $user . "".
"&v-password=". $pass ."".
"&v-domain_name=". $main->getvar['fdom'] ."".
"&v-dnstemplate_name=" . $this->dnstemplate ."".
"&v-plan_name=". $package ."".
"&v-send_welcome_f=" . $send_email_kloxo .
"&v-contactemail=".$email."";
// Reseller or Not?
if($reseller) {
$string .= "&v-type=reseller";
}
else {
$string .= "&v-type=customer";
}
//echo $action."<br />". $reseller;
$command = $this->remote($string);
if($command == true) {
return true;
}
else {
echo "An error has occurred. Please inform your system administrator.";
return false;
}
}
/**
* Thanks to Days and Kevin for fixing the suspend, unsuspend and terminate functions
**/
public function suspend($user, $server, $reason = false) {
$this->server = $server;
$action = "action=update&subaction=disable&class=client&name=" . strtolower($user);
return $this->remote($action);
}
public function unsuspend($user, $server) {
$this->server = $server;
$action = "action=update&subaction=enable&class=client&name=" . strtolower($user);
return $this->remote($action);
}
public function terminate($user, $server) {
$this->server = $server;
$action = "action=delete&class=client&name=" . strtolower($user);
return $this->remote($action);
}
public function changePwd($acct, $newpwd, $server)
{
$this->server = $server;
$string = "action=update&subaction=password&class=client&name=".$acct."&v-password=".$newpwd;
$command = $this->remote($string);
if($command == true) {
return true;
}
else {
echo "Password could not be changed.";
return false;
}
}
public function testConnection($serverId = null) {
if(!is_null($serverId)) {
$this->server = (int)$serverId;
}
$command = $this->remote("", 1);
if($command == true) {
return true;
}
else {
return "Invalid login.";
}
}
public function upgrade($server, $pkg, $user){
global $main;
global $db;
$this->server = $server;
$action = "action=update&subaction=change_plan&class=client&name=".$user."&v-resourceplan_name=".$pkg;
$command = $this->remote($action);
if($command == true) {
return true;
}
else {
echo "Could not perform upgrade. Please report this to the administrator.";
return false;
}
}
}
Posts: 198
Threads: 12
Joined: Oct 2011
Reputation:
11
Nothing seems to be wrong with your file. Have you switched off the WHM-SSL config in the Configuration Page?
|