Results 1 to 4 of 4
Thread: TeamSpeak 3 PHP Framework
-
01-03-2011, 13:15 #1
-= TeamSpeak User =-
- Join Date
- Mar 2011
- Posts
- 6
TeamSpeak 3 PHP Framework
Hi,
I use the PHP FrameWork and grep the viewer.php to include it on my website. Everything works great when I visit the viewer.php (after changing some paths, because I moved the php file).
However when I try to include the file or copy/past the code in my current code I got 1 problem. It's because I use __autoload() in my PHP website and I found also function autoload() in TeamSpeak3.php.
So this gives conflicts, how can I best solve this?
Thanks!
Kind regards,
Melroy van den Berg
require_once(xxxx teamspeak3_helper_profiler.class.php): failed to open stream: No such file or directory in
-
11-03-2011, 23:15 #2
-= TeamSpeak User =-
- Join Date
- Mar 2011
- Posts
- 6
my bad ofc, it was conflicting with my own autoload function. So I used:
Teamspeak 3 php framework already use spl_autoload_register(). So now it works great.spl_autoload_register('myAutoLoad');
-
11-06-2012, 15:44 #3
-= TeamSpeak Lover =-
- Join Date
- Sep 2008
- Location
- England...
- Posts
- 35
A user just contacted me with this error ScP, I was hoping you could shed some light?
1. User was online, registered with the name "FI.RE Ordonnanz 1" 1 minute before attempting to register through my system with "-MLH- Ordonnanz 1". (His permissions need changing so my system kicked him, deleted him and asked him to re-register automatically)
2. Error received :
The error that the client is online leads me to believe that the error is with the part of code that should see that he is online and kick him.Attempting to grant access to: -MLH- Ordonnanz 1...
Removing your old registrations...
Warning: preg_match() [function.preg-match]: Unknown modifier 'b' in /home/sever/public_html/ts3api/TeamSpeak3/Helper/String.php on line 192 (repeated another 20 times)
Warning: Failed to delete user: FI.RE Ordonnanz 1 TSDID: 2990. Please Mail this message to MJ Maverick immediately. (Error: client is online) [F127]
0 old registration removed.
Code :
PHP Code:try {
// connect to the server
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://".$c->tsname.":".$c->tspass."@".$c->tshost.":".$c->tsport."/?server_port=".$c->tscport);
} catch (TeamSpeak3_Exception $e) {
die("Error: ".$e->getMessage()." [F".__LINE__."]");
}
try {
$online = $ts3_VirtualServer->clientList(array("client_unique_identifier" => $tsUniqueID));
if(count($online)) {
// they are online with an already registered account
die("Attention: You are online with an already registered account! I can't delete your old registration while you are connected with it, disconnect and refresh this page. [F".__LINE__."]<br />");
} else {
$ts3_VirtualServer->clientdeleteDb($tsDatabaseID);
// they are gone, remove them from the database
try {
$queryDelete = "DELETE FROM users WHERE characterID = $characterID;";
mysql_query($queryDelete, $conRemoveOld );
$removed = $removed + 1;
} catch (TeamSpeak3_Exception $e) {
echo "Warning: Failed to remove old registrations of: ".$tsName." from the database, entry ".$entryID.". Please EVEMail this message to ".$c->admin." immediately. (Error: ".$e->getMessage().") (SQL: ". mysql_error() .") [F".__LINE__."]<br />";
}
}
} catch (TeamSpeak3_Exception $e) {
echo "Warning: Failed to delete user: ".$tsName." TSDID: ".$tsDatabaseID.". Please EVEMail this message to ".$c->admin." immediately. (Error: ".$e->getMessage().") [F".__LINE__."]<br />"; // !! LINE 127 !!
}
}
echo $removed." old registration removed.<br /><br />";
That's the relevant section of code. Any ideas?
-
11-06-2012, 16:40 #4
-= TeamSpeak Fanatic =-
- Join Date
- Jan 2010
- Location
- Germany
- Posts
- 2,038
Should prolly ask in the Release Thread about the Framework (or this thread should probably be moved there)...
In any case I seriously hope you are not running SQL Queries directly on the TS3 Server Database!!!
Also why would you need to kick and delete a user from the Server Database just to update his Permissions? It works just fine while they are online, without the need to kick or even delete them!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
[API] TS3 PHP Framework
By ScP in forum ToolsReplies: 626Last Post: 15-05-2013, 12:34 -
Teamspeak, PHP Framework?
By mario2027 in forum General QuestionsReplies: 1Last Post: 21-12-2010, 09:30


Reply With Quote
