MY
pedido

Erro Modern Acc, Rep+

Por Mylife100, 18 de jan. de 2013 em Websites

modern acc
erro
10
2.2k
Mylife100M
18 de janeiro de 2013 às 22:45

Galera hoje tive um erro em meu site, agora não sei como pode ter acontecido pois o arquivo no qual o erro se encontra nunca foi mexido nem adulterado, o erro estar impregnado no arquivo Status.php seguido do seguinte erro:

 

Fatal error: Maximum execution time of 30 seconds exceeded in C:\Documents and Settings\Administrador\Desktop\xampp\htdocs\system\status.php on line 24

,OBS: Estava funcionando, já troquei de modern acc e já tentei resolver

 

 

Codigo Status.php

 

 

 

<?php
// A class contributed from the VAPus PHP project
$serverOnline = array();
$serverPlayers = array();
$serverUptime = array();
$serverMax = array();
$serverPeak = array();
$serverMotd = array();
$serverClient = array();
$serverNPCs = array();
$serverMonsters = array();

class OTConnect {
var $errno = 0;
var $errstr = '';
var $data = '';
var $xml = NULL;
function connect($address, $port) {
$this->sock = @fsockopen($address, $port, $this->errno, $this->errstr, 1);

if($this->sock) {
fwrite($this->sock, chr(6).chr(0).chr(255).chr(255).'info');
        while (!feof($this->sock))
           $this->data .= fgets($this->sock, 1024);
        fclose($this->sock);
$this->xml = simplexml_load_string($this->data);
}
}
function getUptime() {
return (int)$this->xml->serverinfo->attributes()->uptime; 
}
function getClientVersion() {
return (float)str_replace('x', '', $this->xml->serverinfo->attributes()->client); 
}
function getPlayers() {
return @(int)$this->xml->players->attributes()->online; 
}
function getMotd() {
return $this->xml->motd;
}
function getPeak() {
return (int)$this->xml->players->attributes()->peak; 
}
function getMax() {
return (int)$this->xml->players->attributes()->max; 
}
function getServer() {
return $this->xml->serverinfo->attributes()->server; 
}
function getServerVersion() {
return $this->xml->serverinfo->attributes()->version; 
}
function getMonsters() {
return (int)$this->xml->monsters->attributes()->total; 
}
function getNPCs() {
return (int)@$this->xml->npcs->attributes()->uptime; 
}
function getMapHeight() {
return (int)$this->xml->map->attributes()->height; 
}
function getMapWidth() {
return (int)$this->xml->map->attributes()->width; 
}
function getMapName() {
return $this->xml->map->attributes()->name; 
}
function getMapAuthor() {
return $this->xml->map->attributes()->author; 
}
function getName() {
return $this->xml->serverinfo->attributes()->name;
}
function getLocation() {
return $this->xml->serverinfo->attributes()->location;
}
function getURL() {
return $this->xml->serverinfo->attributes()->url;
}
function getOwner() {
return $this->xml->owner->attributes()->owner;
}
}
$xml = array();
require_once('config.php');
global $config;
if(@filemtime(FCPATH.'/cache/status') < time() - $config['statusTimeout']) {
foreach($config['servers'] as $worldID=>$server) {
// Make a connection in order to see if it's on
$serv = new OTConnect();
$serv->connect($server['address'], $server['port']);
$xml[$worldID] = $serv->data;
}
file_put_contents(FCPATH.'/cache/status', json_encode($xml));
} else {

$xml = json_decode(file_get_contents(FCPATH.'/cache/status'), true); 
}
$serv = new OTConnect();
foreach($xml as $worldID=>$code) { 
if($code) {
$serv->xml = simplexml_load_string($code);
$serverPlayers[$worldID] = $serv->getPlayers();
$serverUptime[$worldID] = uptimeParse($serv->getUptime());
$serverMax[$worldID] = $serv->getMax();
$serverPeak[$worldID] = $serv->getPeak();
$serverMotd[$worldID] = $serv->getMotd();
$serverClient[$worldID] = $serv->getClientVersion();
$serverNPCs[$worldID] = $serv->getNPCs();
$serverMonsters[$worldID] = $serv->getMonsters();
$serverOnline[$worldID] = true;
} else {
$serverOnline[$worldID] = false;
$serverPlayers[$worldID] = 0;
$serverUptime[$worldID] = 0;
$serverMax[$worldID] = 0;
$serverPeak[$worldID] = 0;
$serverMotd[$worldID] = 0;
$serverClient[$worldID] = 0;
$serverNPCs[$worldID] = 0;
$serverMonsters[$worldID] = 0;
}
}
?>


 

 

 

REP +

gustavo121G
18 de janeiro de 2013 às 23:00

Amigo eu estarei postando meu status.php para que veja se você consiga arrumar este Erro se não consiguir me avise estarei tentando te ajudar.

 

Você pode estar baixando meu status.php Clicando Aqui

 

Agora se não resolver deve ser problema no otserver.

Editado Janeiro 19 por gustavo121

AlexandreKGA
19 de janeiro de 2013 às 23:33

Resolvido?

Piabeta KunP
20 de janeiro de 2013 às 07:58

A sua pagina só não consegue ser acessada a a passar do tempo limiteele da esse erro, no fim,não tem erro na pagina o emulador no caso o webserver não consegue rodar o script, pois nao deve ter suporte ao tipo de codigo usado dentro do script, aconselho usar um webserver mais atualizado!

Mylife100M
20 de janeiro de 2013 às 14:33

Qual webserver por exemplo ?

 

 

gustavo121

 

Baixei vou testar xD

--Edit--

 

Não funfou acho que é o que o Piabeta estar certo.

PiabetaMan01

 

Pode me dizer um webserver atualizado, sei lá, que funcione corretamente ?

Estou usando xampp 1.7.7

Editado Janeiro 20 por Mylife100

AlexandreKGA
20 de janeiro de 2013 às 14:57

Use o xampp 1.8.1

Piabeta KunP
20 de janeiro de 2013 às 17:10

Teste e reporte se resolvido, para ser movido para area correta ajudando e facilitando a busca de todos!

 

Aguardo!

Mylife100M
20 de janeiro de 2013 às 22:20

Duvida Senada.

 

Problema resolvido:

 

Uso do Wampp Server

 

 

REP + para Ambos xD

Editado Janeiro 20 por Mylife100

AlexandreKGA
20 de janeiro de 2013 às 23:01

Dúvida sanada!

 

Movido!

 

Obrigado aos que ajudaram!

Mylife100M
26 de janeiro de 2013 às 03:52

O erro voltou ! =s

Continua dando o mesmo erro mudei para o xampp mais novo e o erro prossegui =s

alguém ajuda ?