Forum

Page 55 of 100 FirstFirst ... 545535455565765 ... LastLast
Results 811 to 825 of 1493
  1. #811
    Join Date
    October 2003
    Location
    Germany
    Posts
    2,510
    Quote Originally Posted by barricas View Post
    Edit: Yap, removed permissions assignment and the difference was abysmal. Used to jump like 10% and now ~1% not even noticiable.

    Are the permissions not done in another thread or something that cause this? The CPU load in the TS Server VPS never spikes.

    Edit 2: As suspected by ScP is caused by the DB operations not being async.
    One question on the permissions issue. Are you executing one commend per permission or are you setting all permissions with a single command? While this shouldn't make a difference on the number of db operations, it might impact the server performance due to a lot of query commands executed.

  2. #812
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317
    Quote Originally Posted by ScP View Post
    One question on the permissions issue. Are you executing one commend per permission or are you setting all permissions with a single command? While this shouldn't make a difference on the number of db operations, it might impact the server performance due to a lot of query commands executed.
    Single command.
    The thing is I set some file-browser permissions (So that channel guests can't use it but other channel ranks can), and these perms have to be updated to all clients, that's the issue. While it updates, voice processing "goes to the waiting line" (thus causing packet loss)

  3. #813
    Join Date
    July 2006
    Posts
    1,600
    Quote Originally Posted by ScP View Post
    While this shouldn't make a difference on the number of db operations, it might impact the server performance due to a lot of query commands executed.
    The server's performance should not suffer regardless of the number of db operations (even if we are talking about 100s) because they are mainly disk-io-bound.

  4. #814
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317
    Quote Originally Posted by maxi1990 View Post
    The server's performance should not suffer regardless of the number of db operations (even if we are talking about 100s) because they are mainly disk-io-bound.
    That is not the problem, the problem is that DB ops are async, meaning that while the server is performing a DB query, it will stop do everything else. With smaller servers that is not a prob. Even mine with ~150 only goes up by 0.2%, others with 400+ the packet loss rises quite a bit.

    Quote Originally Posted by Death_Balgor View Post
    hi, can be traced through the user id to the channels / sub-channels created by him and view them from a web page in order to add additional sub-channel?

    You can also create a small preview of all channels, sub-channels, and users connected to a particular channel? thanks
    The way I do is that I store each client UID, DBID and their channel, I also log every operation to a mysql database, that way you can limit per client and also know who did bad stuff (if it ever happens)

  5. #815
    Join Date
    January 2014
    Posts
    13
    im trying to put a ts3 client in a server group from my web server so, I can have the site put registered users from a form in a specified server group, here is the code I tried and the errors I recived, what am I doing wrong?

    Edit: Also I tried servergroupaddclient instead of servergroupclientadd , from the server query manual.

    I am using TS3 PHP Framework 1.1.23

    web server and ts3 server are on same system.



    Errors


    ( ! ) Fatal error: Uncaught exception 'TeamSpeak3_Node_Exception' with message 'node method 'serverGroupClientAdd()' does not exist' in C:\Program Files (x86)\Web Server\www\libraries\TeamSpeak3\Node\Abstract.php on line 382


    ( ! ) TeamSpeak3_Node_Exception: node method 'serverGroupClientAdd()' does not exist in C:\Program Files (x86)\Web Server\www\libraries\TeamSpeak3\Node\Abstract.php on line 382

    Call Stack

    # Time Memory Function Location

    1 0.0009 248976 {main}( ) ..\ts3test.php:0
    2 0.2579 1414432 serverGroupClientAdd ( ) ..\ts3test.php:24
    3 0.2579 1414848 TeamSpeak3_Node_Abstract->__call( ) ..\ts3test.php:24





    Code

    PHP Code:
    <?php
    /* set error reporting levels */
    error_reporting(E_ALL E_STRICT);

    /* set default timezone */
    date_default_timezone_set("America/New_York");


    /* load framework library */
    require_once("/libraries/TeamSpeak3/TeamSpeak3.php");

    $usrname "MY QUREY USERNAME";
    $pass "MY QUREY PASSWORD";
    $host "TS3 IP";
    $qport "10011";
    $sport "9987";

    $sgid "6";     //admin server group
    $cldbid "8";   // a friends clientBDid

    /* connect to server, authenticate and get TeamSpeak3_Node_Server object by URI */
    $ts3_VirtualServer TeamSpeak3::factory("serverquery://{$usrname}:{$pass}@{$host}:{$qport}/server_port={$sport}");

    $ts3_VirtualServer->serverGroupClientAdd($sgid,$cldbid);

    ?>

    thanks

  6. #816
    Join Date
    October 2003
    Location
    Germany
    Posts
    2,510
    Quote Originally Posted by Soulkeeper5 View Post
    im trying to put a ts3 client in a server group from my web server so, I can have the site put registered users from a form in a specified server group, here is the code I tried and the errors I recived, what am I doing wrong?
    Simple. You're missing a ? in front of server_port in your factory URI...

    PHP Code:
    $ts3_VirtualServer TeamSpeak3::factory("serverquery://{$usrname}:{$pass}@{$host}:{$qport}/?server_port={$sport}"); 

  7. #817
    Join Date
    January 2014
    Posts
    13
    THANK YOU so much. You are awsome

  8. #818
    Join Date
    October 2003
    Location
    Germany
    Posts
    2,510
    Quote Originally Posted by Soulkeeper5 View Post
    THANK YOU so much. You are awsome
    I know.


  9. #819
    Join Date
    February 2013
    Posts
    47
    hi, sorry for the request but I do not know where to turn! can someone help me convert this code which allows me to check if a user id and ip are the same, to use instead of a mysql database with a sqlite database?
    It's possible?

    Code:
    <?php
    session_start();
    
    $username = $_POST['username'];
    $password = $_POST['password'];
    
    $mysql_db_hostname = "";
    $mysql_db_user = "";
    $mysql_db_password = "";
    $mysql_db_database = "";
    
    $con = mysql_connect($mysql_db_hostname, $mysql_db_user, $mysql_db_password) or die("Could not connect database");
    mysql_select_db($mysql_db_database, $con) or die("Could not select database");
    
    $query = "SELECT * FROM clients WHERE client_id='$username' AND client_lastip='$password'";
    $result = mysql_query($query)or die(mysql_error());
    $num_row = mysql_num_rows($result);
    		$row=mysql_fetch_array($result);
    		if( $num_row >=1 ) {
    
    			echo 'true';
    			$_SESSION['user_name']=$row['client_id'];			
    			
    		}
    		else{
    			echo 'false';
    		}
    ?>

  10. #820
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317
    For SQLite you should take a look into PDO, it supports SQLite.

  11. #821
    Join Date
    June 2011
    Location
    Baghdad, Iraq
    Posts
    367
    Hello,

    am trying to create an event based BOT for my server i want to make server group protection feature but i cant get the server group add/remove event

    am using your code from page 39

    any idea how to catch server group events?
    Thanks in advance
    ###########################################
    //edit after some reading around looks like TeamSpeak don't register/call notifications on server groups events
    looks like the only way to do it is to loop protected groups over and over :S

    Last edited by Ahmed; January 28th, 2014 at 07:23 PM.

  12. #822
    Join Date
    February 2014
    Posts
    2
    hey!
    I have a little problem with list of user

    Use framwork
    PHP Code:
    [
    <?php
    require_once("/libraries/TeamSpeak3/TeamSpeak3.php");
    $ts3_VirtualServer TeamSpeak3::factory("serverquery://login:[email protected]:10011/?server_port=9987");
    foreach(
    $ts3_VirtualServer->clientList() as $tsclient) {
        echo 
    $tsclient ;
    }
    ?>
    Result:

    login(my nick) from 127.0.0.1:49230 user1 my_nick user2 user3 etc

    How to disable red bold text (server login and ip) and dispplay the users themselves?

    Thx!

  13. #823
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317
    if($tsclient['client_type'] == 1) continue;

    I think it is that way you can skip query clients, not sure but it is something around that.

  14. #824
    Join Date
    February 2014
    Posts
    2
    Quote Originally Posted by barricas View Post
    if($tsclient['client_type'] == 1) continue;

    I think it is that way you can skip query clients, not sure but it is something around that.
    Thanks a lot, it works!

  15. #825
    Join Date
    December 2009
    Location
    SOUTH EARtH
    Posts
    39

    Teamspeak 3 PHP Framework - privilegeKeyList Error

    When I use privilegeKeyList function I get:

    Code:
    exception 'TeamSpeak3_Adapter_ServerQuery_Exception' with message 'database empty result set' in /var/www/clients/client1/web38/private/modules/servers/teamspeak3/libs/TeamSpeak3/Adapter/ServerQuery/Reply.php:319 Stack trace: #0 /var/www/clients/client1/web38/private/modules/servers/teamspeak3/libs/TeamSpeak3/Adapter/ServerQuery/Reply.php(91): TeamSpeak3_Adapter_ServerQuery_Reply->fetchError(Object(TeamSpeak3_Helper_String)) #1 /var/www/clients/client1/web38/private/modules/servers/teamspeak3/libs/TeamSpeak3/Adapter/ServerQuery.php(141): TeamSpeak3_Adapter_ServerQuery_Reply->__construct(Array, 'privilegekeylis...', Object(TeamSpeak3_Node_Host), true) #2 /var/www/clients/client1/web38/private/modules/servers/teamspeak3/libs/TeamSpeak3/Node/Abstract.php(73): TeamSpeak3_Adapter_ServerQuery->request('privilegekeylis...', true) #3 /var/www/clients/client1/web38/private/modules/servers/teamspeak3/libs/TeamSpeak3/Node/Server.php(90): TeamSpeak3_Node_Abstract->request('privilegekeylis...', true) #4 /var/www/clients/client1/web38/private/modules/servers/teamspeak3/teamspeak3.php(359): TeamSpeak3_Node_Server->request('privilegekeylis...') #5 /var/www/clients/client1/web38/web/includes/classes/class.module.php(0): teamspeak3_ClientArea(Array) #6 /var/www/clients/client1/web38/web/includes/classes/class.service.php(0): WHMCS_Module->call() #7 /var/www/clients/client1/web38/web/clientarea.php(0): WHMCS_Service->moduleCall() #8 {main}
    That only occurs when the key list is empty.

    What can I do?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PHP Framework
    By Multivit4min in forum Permission System
    Replies: 1
    Last Post: June 29th, 2015, 11:28 AM
  2. PHP Framework
    By phil998 in forum Server Support
    Replies: 0
    Last Post: February 25th, 2015, 06:27 PM
  3. TS3 PHP Framework Visualizations
    By Ronin Design in forum Tools / Web Based
    Replies: 2
    Last Post: February 22nd, 2015, 05:04 AM
  4. Extraction using the Framework
    By HarryMW in forum Tools / Web Based
    Replies: 1
    Last Post: August 3rd, 2012, 07:04 PM
  5. Teamspeak, PHP Framework?
    By mario2027 in forum General Questions
    Replies: 1
    Last Post: December 21st, 2010, 09:30 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •