Community Forums Today's Posts     Member List     Archive    
Page 29 of 43 FirstFirst ... 19272829303139 ... LastLast
Results 421 to 435 of 632
  1. #421
    Join Date
    Feb 2010
    Location
    Bordeaux
    Posts
    4
    Hi,

    First, thank you for this work!

    So, i have a php error when i'm trying the examples code :

    Code:
    Error 0: php_network_getaddresses: getaddrinfo failed: Name or service not known
    Anyone have an idea where the problem may come from?

    Thanks!

  2. #422
    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,299
    Sounds like there might be an issue with the DNS configuration on your server.

  3. #423
    Join Date
    Feb 2010
    Location
    Bordeaux
    Posts
    4
    It's what i have found during my search but i have used the ip as hostname so there is no need to use DNS to resolve whatever ...

    Moreover, my server is properly configured and can resolves names & ping teamspeak's server address.

    Even if i use the dns name or the ip address, i get the same error.

  4. #424
    Join Date
    Oct 2010
    Location
    Texas
    Posts
    10
    Is there somewhere we can get a list of all exception codes and their meaning for better error handling etc.?

    Thanks!
    Last edited by echoDreamz; 19-03-2012 at 19:42.

  5. #425
    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,299
    The SDK includes a header file containing most TS3 error codes available.

  6. #426
    Join Date
    Dec 2009
    Location
    Poland
    Posts
    43
    Framework version: newest

    Problem: "Server is not running" - with attr. /?use_offline_as_virtual=1 or "Server got an invalid status for this operation" without this attr during using function Delete()

    Class
    Code:
    ...
    public function CheckVirtualServer($attr = '', $remove = FALSE)
    	{		
    
    		try
    		{
    			
    			if($remove)
    			{
    				$ts3_VirtualServer = TeamSpeak3::factory("serverquery://".self::QUERY_USERNAME.":".self::QUERY_PASSWORD."@".$this -> machine['machine_ip'].":".$this -> query_port."/?server_id=".$this -> data['server_vserver_id'].$attr);
    			}
    			else
    			{
    				$addid = rand(1024, 262144);
    				$ts3_VirtualServer = TeamSpeak3::factory("serverquery://".self::QUERY_USERNAME.":".self::QUERY_PASSWORD."@".$this -> machine['machine_ip'].":".$this -> query_port."/?use_offline_as_virtual=1&server_id=".$this -> data['server_vserver_id']."&nickname=ServerAdmin:{$addid}".$attr);
    				//"&nickname=QueryAdmin:{$addid}".
    			}
    		}
    		catch(Exception $e)
    		{
    			if($e->getMessage() == 'Connection refused')
    			{
    				$this -> error = "Połączenie zostało odrzucone.";;
    				$this -> StartInstance();
    			}
    			else $this -> error = "Wystąpił nieoczekiwany błąd (".$e->getMessage().")";
    			return false;	
    		}
    		
    		return $ts3_VirtualServer;
    	}
    
    
    public function RemoveServer()
    	{
    		global $cms; 
    		
    		//echo $this -> data['server_vserver_id'];
    		
    		if($this -> data['server_vserver_id'] < 1)
    		{
    			$this -> error = "Ten serwer nie jest zainstalowany.";
    			return false;	
    		}
    		
    		if(!($ts3_VirtualServer = $this -> CheckVirtualServer())) return false;
    		//if(!($ts3_VirtualServer = $this -> CheckVirtualServer(null, TRUE))) return false;
    		
    		//if(!($ts3_VirtualServer = $this -> CheckInstance()->serverGetByPort($this -> data['server_port'])->getId())) return false;
    		
    		if($ts3_VirtualServer -> isOnline()) $ts3_VirtualServer -> Stop();
    		//if(!$ts3_VirtualServer -> isOffline()) $ts3_VirtualServer -> Stop();
    		usleep(1000);
    		$ts3_VirtualServer ->  Delete();
    		
    		$cms -> db -> delete('server_backups', 'sb_server_id', $this -> id);
    		$cms -> db -> delete('banners', 'banner_server_id', $this -> id);
    		
    		$cms -> db -> update('servers', array('server_vserver_id' => 0), 'server_id', $this -> id);
    		$this -> data['server_vserver_id'] = 0;
    		return true;	
    	}
    ...
    My crontab file
    Code:
    ...
    $srv = new teamspeak($server);	
    			
    			try
    			{
    				if($srv -> RemoveServer()) 
    				{
    					$cms -> db -> delete('servers', 'server_id', $server['server_id']);
    					echo "\n[DEL] [{$server['server_type']}] {$server['server_port']}: Serwer {$server['server_type']} o ID: #{$server['server_id']} (VID: {$server['server_vserver_id']}) zostal usuniety (stary).";
    				}
    				else echo "\n[ERROR] {$server['server_id']}(VID: {$server['server_vserver_id']}): {$srv -> error}";
    			} 
    			catch (Exception $e)
    			{
    				echo "\n[ERR] {$server['server_port']}: Serwer {$server['server_type']} ID: #{$server['server_id']}: {$e->getMessage()} || {$srv -> error}";
    			}
    ...
    Last edited by Dream; 30-03-2012 at 12:35.

  7. #427
    Join Date
    Apr 2012
    Posts
    4
    Framework version: newest

    I use the Framework with Standart Example Viewer. My Problem ist that the Words of Clientnames / Channelnames are to long for my HP "Box".
    I edit the Html.php to get the Clientnames shorter with substr, but that doesnt work with the Channelname.
    /**
    * Returns a string for the current corpus element which contains the display name
    * for the current TeamSpeak_Node_Abstract object.
    *
    * @return string
    */
    protected function getCorpusName()
    {
    if($this->currObj instanceof TeamSpeak3_Node_Channel && $this->currObj->isSpacer())
    {
    if($this->currObj->spacerGetType() != TeamSpeak3::SPACER_CUSTOM) return;

    $string = $this->currObj["channel_name"]->section("]", 1, 99)->substr(10);

    if($this->currObj->spacerGetAlign() == TeamSpeak3::SPACER_ALIGN_REPEAT)
    {
    $string->resize(30, $string);
    }

    return htmlspecialchars($string);
    }

    if($this->currObj instanceof TeamSpeak3_Node_Client)
    {
    $before = array();
    $behind = array();

    foreach($this->currObj->memberOf() as $group)
    {
    if($group->getProperty("namemode") == TeamSpeak3::GROUP_NAMEMODE_BEFORE)
    {
    $before[] = "[" . htmlspecialchars($group["name"]) . "]";
    }
    elseif($group->getProperty("namemode") == TeamSpeak3::GROUP_NAMEMODE_BEHIND)
    {
    $behind[] = "[" . htmlspecialchars($group["name"]) . "]";
    }
    }

    return implode("", $before) . " " . htmlspecialchars($this->currObj) . " " . implode("", $behind);
    }

    return htmlspecialchars($this->currObj);
    }
    How can i do the same for the Channelnames ? i try a lot but nothing work.
    Im a PHP beginner so please be carfule with me

    Greetz Bernhard

  8. #428
    Join Date
    Jan 2010
    Location
    Germany
    Posts
    227
    Quote Originally Posted by dasSpfa View Post
    I use the Framework with Standart Example Viewer. My Problem ist that the Words of Clientnames / Channelnames are to long for my HP "Box".
    I edit the Html.php to get the Clientnames shorter with substr, but that doesnt work with the Channelname.

    How can i do the same for the Channelnames ? i try a lot but nothing work.
    I would try the following:
    Code:
    if($group->getProperty("namemode") == TeamSpeak3::GROUP_NAMEMODE_BEFORE)
    {
    $before[] = "[" . htmlspecialchars($group["name"]->substr(10)) . "]";
    }
    elseif($group->getProperty("namemode") == TeamSpeak3::GROUP_NAMEMODE_BEHIND)
    {
    $behind[] = "[" . htmlspecialchars($group["name"]]->substr(10)) . "]";
    }

  9. #429
    Join Date
    Feb 2012
    Posts
    5
    Thank you for help, ScP. But I got yet another question.

    Sometimes when I reload page multiple times I get flood ban message (~120 seconds). Whats causing the issue?

    Also in viewer there is always a "Unknown from x.x.x.xort" user in lobby. Whats causing the issue?

  10. #430
    Join Date
    Jan 2010
    Location
    Germany
    Posts
    227
    Hey ScP,

    I think I've found a bug.

    If i call TeamSpeak3_Node_Server::clientListDb() without any parameters i got only 25 entries from the database.
    Expected Result: all entries from the database.

    Btw. Is there any method available to filter the result of clientListDb() (I need only database id, unique identifier, last nickname)?

  11. #431
    Join Date
    Apr 2012
    Location
    Italy
    Posts
    3
    anyway there's no documentation about the first steps we should do to install and i hope you will report this gap.

    i have the same problem,
    ip web server added to the whitelist
    query port forwarded
    i don't know what is guest query group
    my page /examples/config.php is set up with ts3 server ip, query-port, voice-port, serveradmin+querypsw
    xampp php 5.3.8

    when i try to access via web, the answer is:
    Error 520: invalid loginname or password
    Last edited by fr33soul; 13-04-2012 at 10:31.

  12. #432
    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,299
    Quote Originally Posted by faralsimbor View Post
    If i call TeamSpeak3_Node_Server::clientListDb() without any parameters i got only 25 entries from the database.
    Expected Result: all entries from the database.
    Nope. The TS3 server only returns 25 entries when the command is executed without any parameter.

    Quote Originally Posted by faralsimbor View Post
    Btw. Is there any method available to filter the result of clientListDb() (I need only database id, unique identifier, last nickname)?
    That's something I have on my roadmap for the upcoming 2.0.0 release.

  13. #433
    Join Date
    Apr 2012
    Location
    Italy
    Posts
    3
    Code:
    /**
       * Returns the HTML img tags which can be used to display the various icons for a
       * TeamSpeak_Node_Abstract object.
       *
       * @return string
       */
      protected function getCorpusTitle()
      {
        if($this->currObj instanceof TeamSpeak3_Node_Server)
        {
          return "ID: " . $this->currObj->getId() . " | Clients: " . $this->currObj->clientCount() . "/" . $this->currObj["virtualserver_maxclients"] . " | Uptime: " . TeamSpeak3_Helper_Convert::seconds($this->currObj["virtualserver_uptime"]);
        }
        elseif($this->currObj instanceof TeamSpeak3_Node_Channel && !$this->currObj->isSpacer())
        {
          return "ID: " . $this->currObj->getId() . " | Codec: " . TeamSpeak3_Helper_Convert::codec($this->currObj["channel_codec"]) . " | Quality: " . $this->currObj["channel_codec_quality"];
        }
        elseif($this->currObj instanceof TeamSpeak3_Node_Client)
        {
          return "ID: " . $this->currObj->getId() . " | Version: " . TeamSpeak3_Helper_Convert::version($this->currObj["client_version"]) . " | Platform: " . $this->currObj["client_platform"];
        }
        elseif($this->currObj instanceof TeamSpeak3_Node_Servergroup || $this->currObj instanceof TeamSpeak3_Node_Channelgroup)
        {
          return "ID: " . $this->currObj->getId() . " | Type: " . TeamSpeak3_Helper_Convert::groupType($this->currObj["type"]) . " (" . ($this->currObj["savedb"] ? "Permanent" : "Temporary") . ")";
        }
      }
    i'm trying to add the avatar to the /libraries/ts3/html/viewer.php in the function getCorpusTitle so when i will be onmouseover on a client, it will show me little <div> like a <title> with a small thumb of the avatar.. too hard for me to explore all the framework..

    however, i suggest to add an "offline" output if the serverquery is down instead of php socket connection failed as usual.
    Last edited by fr33soul; 17-04-2012 at 08:40.

  14. #434
    Join Date
    Aug 2011
    Posts
    14
    Hi, im a framework noob and i have a question, which, in turn will probably help me answer a lot of other questions i have.

    im trying to change a single server instance autostart property to '0' but cant seem to get it to work.

    this is what i have so far:

    Code:
    $ts3_ServerInstance = TeamSpeak3::factory("serverquery://" . $cfg["user"] . ":" . $cfg["pass"] . "@" . $cfg["host"] . ":" . $cfg["query"] . "?server_port=9987");
    
         $ts3_VirtualServer["virtualserver_autostart"] = "0";
    the above i tried by server port, not ID, but doesnt work either, how can i do it via port and fix my autostart change as its not changing?
    Last edited by ukrai; 20-04-2012 at 01:17.

  15. #435
    Join Date
    Aug 2011
    Posts
    14
    Another quick question, how do i ignore serverid's that dont exist or are offline.

    Im trying to run through an array of server id's from a customer database and ensure inactive customer servers are offline.

    here is what i have:

    Code:
    $ts3_ServerInstance = TeamSpeak3::factory("serverquery://" . $cfg["user"] . ":" . $cfg["pass"] . "@" . $cfg["host"] . ":" . $cfg["query"] . "/");
    
    foreach ($serverIDs as $key => $value) { 
    $ts3_ServerInstance->serverStop($value);
    }
    this works fine as long as all id's in question are online and exist, as soon as it hits one that is offline or doesnt exist, the script stops, giving an error about server not being online but wont continue.

    How do i put in something like 'if server exists or online, then...'

    help would be much appreciated.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. TS3 PHP Framework Connection problems
    By stheam in forum General Questions
    Replies: 1
    Last Post: 01-01-2013, 21:03
  2. Extraction using the Framework
    By HarryMW in forum Tools
    Replies: 1
    Last Post: 03-08-2012, 19:04
  3. TeamSpeak 3 PHP Framework
    By danger89 in forum General Questions
    Replies: 3
    Last Post: 11-06-2012, 16:40
  4. Teamspeak, PHP Framework?
    By mario2027 in forum General Questions
    Replies: 1
    Last Post: 21-12-2010, 09:30
  5. [solved] Problem with Ts3 und Ts3 Php Framework
    By m3ntry in forum Bug Reports
    Replies: 1
    Last Post: 14-10-2010, 05:55

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
  •