planetteamspeak / ts3phpframework

Modern use-at-will framework that provides individual components to manage TeamSpeak 3 Server instances
https://www.planetteamspeak.com
GNU General Public License v3.0
212 stars 59 forks source link

Uncaught Error: Class "PlanetTeamSpeak\TeamSpeak3Framework\Helper\Profiler" #223

Open sulimanzeen opened 2 months ago

sulimanzeen commented 2 months ago

I am using the version 1.3.0 and for some reason I get this error.

Fatal error: Uncaught Error: Class "PlanetTeamSpeak\TeamSpeak3Framework\Helper\Profiler" not found in

<?php
// Turn off error display for production
use TS3\Config;
use PlanetTeamSpeak\TeamSpeak3Framework\TeamSpeak3;

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(1);

require_once("libraries/TeamSpeak3/TeamSpeak3.php");
require_once("config.php");

// Set the timezone to GMT
date_default_timezone_set('GMT');

$currentTime = date("H:i");
$currentDate = date("l - Y-m-d ");

// Load configuration
$Config = new Config();
$username = $Config->username;
$password = $Config->password;
$address = $Config->address;
$queryport = $Config->queryport;
$voiceport = $Config->voiceport;
$BotName = $Config->BotName;
$PokeOrMessage = $Config->PokeOrMessage;

$EncodedBotName = str_replace(' ', '%20', $BotName);

try {
    $ts3 = TeamSpeak3::factory("serverquery://{$username}:{$password}@{$address}:{$queryport}/?server_port={$voiceport}&nickname={$EncodedBotName}&blocking=0");
} catch (Exception $e) {
    die("Error connecting to TeamSpeak server: " . $e->getMessage());
}
?>
sulimanzeen commented 2 months ago

the /libraries/TeamSpeak3/ are the src folder.