help server start

maribro124

Restricted
Mar 6, 2016
38
7
43
help server start not work

HELP Server Start Not Work

<?php
session_start();
include 'inc/header.php';
require 'app/Verify.php';
require 'app/Infos.php';
require_once("libraries/TeamSpeak3/TeamSpeak3.php");
require 'app/Keys.php';
require 'inc/db.php';
if(!isset($_SESSION['auth'])){
header('Location: login.php');
exit();
}
$infos = new \App\Infos($cnx);
$port = $infos->getPort($_SESSION['auth']['pseudo']);
try

$ts3_VirtualServer = TeamSpeak3::factory("serverquery://serveradmin:p[email protected]:10011/?server_port=".$port);

// start virtual server
$ts3->serverStart($port);
 

Agusanz

Active Member
Jul 18, 2015
239
148
88
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://serveradmin:p[email protected]:10011/?server_port=".$port);
// start virtual server
$ts3->serverStart($port);
Man.. you can't define $ts3_VirtualServer and then try to use $ts3 variable.. it obviously doesn't exist.. try to rename $ts3 to $ts3_VirtualServer
 

maribro124

Restricted
Mar 6, 2016
38
7
43
cats.jpg


error bro
 

Agusanz

Active Member
Jul 18, 2015
239
148
88
cats.jpg


error bro
post your code again with the change you made, that's exactly the error i'm telling you about.. you're saying that the connection string is $ts3_VirtualServer and then you're trying to execute that connection using $ts3.. "$ts3" doesn't exist in your code at all.
 

maribro124

Restricted
Mar 6, 2016
38
7
43
bro problem fixed server and server not started?

Code:
<?php
session_start();
include 'inc/header.php';
require 'app/Verify.php';
require 'app/Infos.php';
require_once("libraries/TeamSpeak3/TeamSpeak3.php");
require 'app/Keys.php';
require 'inc/db.php';
if(!isset($_SESSION['auth'])){
  header('Location: login.php');
  exit();
}
$verify = new \App\Verify($cnx);
$verify->checkIndex($_SESSION['auth']['pseudo']);
$infos = new \App\Infos($cnx);
$port = $infos->getPort($_SESSION['auth']['pseudo']);
try
{
/*
  CHANGE THIS LINE WITH YOUR TS3 QUERY INFOS
*/
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://serveradmin:[email protected]:10011/?server_port=".$port);
$ts3_VirtualServer->serverStart($port); 

}
catch (Exception $e)
{
  $_SESSION['flash']['danger'] = "Ana Makine Kapalidir Lütfen İletişim Geciniz!";
  $offline = true;
  header('Location: offline.php');
  exit();
}
 

Agusanz

Active Member
Jul 18, 2015
239
148
88
Why do you people even bother. It's not that he's going to get your point anyway.
oh well.. if i can help him in any way, i will try it.. sometimes the language barrier it's way too big..

bro problem fixed server and server not started?

Code:
<?php
session_start();
include 'inc/header.php';
require 'app/Verify.php';
require 'app/Infos.php';
require_once("libraries/TeamSpeak3/TeamSpeak3.php");
require 'app/Keys.php';
require 'inc/db.php';
if(!isset($_SESSION['auth'])){
  header('Location: login.php');
  exit();
}
$verify = new \App\Verify($cnx);
$verify->checkIndex($_SESSION['auth']['pseudo']);
$infos = new \App\Infos($cnx);
$port = $infos->getPort($_SESSION['auth']['pseudo']);
try
{
/*
  CHANGE THIS LINE WITH YOUR TS3 QUERY INFOS
*/
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://serveradmin:[email protected]:10011/?server_port=".$port);
$ts3_VirtualServer->serverStart($port);

}
catch (Exception $e)
{
  $_SESSION['flash']['danger'] = "Ana Makine Kapalidir Lütfen İletişim Geciniz!";
  $offline = true;
  header('Location: offline.php');
  exit();
}
Post the logs again please, what's the error?
The bot should be online, you need to activate "Show serverquery clients" on your server bookmarks to be able to see it
 

maribro124

Restricted
Mar 6, 2016
38
7
43
oh well.. if i can help him in any way, i will try it.. sometimes the language barrier it's way too big..


Post the logs again please, what's the error?
The bot should be online, you need to activate "Show serverquery clients" on your server bookmarks to be able to see it

Bro Default TS3 Server and white page :(
 

Agusanz

Active Member
Jul 18, 2015
239
148
88
Bro Default TS3 Server and white page :(
it's working then.. btw.. your script doesn't do anything.. it just connect to the ts3 server and that's it..
if you connect to your teamspeak sever with "show serverquery clients" checked you will see it online... doing nothing :D
 

Agusanz

Active Member
Jul 18, 2015
239
148
88
add this: echo "test";
below this line: $ts3_VirtualServer->serverStart($port);

Result:
Code:
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://serveradmin:[email protected]:10011/?server_port=".$port);
$ts3_VirtualServer->serverStart($port);
echo "test";
}
You should be able to read "test" on your white page..
 

maribro124

Restricted
Mar 6, 2016
38
7
43
add this: echo "test";
below this line: $ts3_VirtualServer->serverStart($port);

Result:
Code:
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://serveradmin:[email protected]:10011/?server_port=".$port);
$ts3_VirtualServer->serverStart($port);
echo "test";
}
You should be able to read "test" on your white page..
error bro :(

cats.jpg
 

Qraktzyl

Retired Staff
Contributor
Nov 2, 2015
997
723
161
Glad to see you have someone helping you
/Qraktzybro signing out
 

maribro124

Restricted
Mar 6, 2016
38
7
43
BRO HELPPPP

Code:
/////work code and server start


<?php
session_start();
include 'inc/header.php';
require_once("libraries/TeamSpeak3/TeamSpeak3.php");
require_once("ts3admin.class.php");
require 'app/Verify.php';
require 'app/Infos.php';
require 'app/Keys.php';
require 'inc/db.php';
header('Location: index.php');

$ts3 = TeamSpeak3::factory("serverquery://serveradmin:[email protected]:10011=2655");

// start virtual server
$ts3->serverStart(2);


//////work code server not start

<?php
session_start();
include 'inc/header.php';
require 'app/Verify.php';
require 'app/Infos.php';
require_once("libraries/TeamSpeak3/TeamSpeak3.php");
require 'app/Keys.php';
require 'inc/db.php';
if(!isset($_SESSION['auth'])){
  header('Location: login.php');
  exit();
}
$verify = new \App\Verify($cnx);
$verify->checkIndex($_SESSION['auth']['pseudo']);
$infos = new \App\Infos($cnx);
$port = $infos->getPort($_SESSION['auth']['pseudo']);
try
{
/*
  CHANGE THIS LINE WITH YOUR TS3 QUERY INFOS
*/
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://serveradmin:[email protected]:10011/?server_port=".$port);
$ts3_VirtualServer->serverStart($port);
echo "random message, IT WORKS";

}
catch (Exception $e)
{
  $_SESSION['flash']['danger'] = "Ana Makine Kapalidir Lütfen İletişim Geciniz!";
  $offline = true;
  header('Location: offline.php');
  exit();
}

EDIT BY MOD
Removed password even tough its localhost.
 
Last edited by a moderator:

Qraktzyl

Retired Staff
Contributor
Nov 2, 2015
997
723
161
What's the issue now?

You should really take a php class. We're happy to help you, but those are basic errors.

Normally, when you are catching for errors you need to try{ first.
 
Top