Erro Modern Acc, Rep+

Mylife100
em Websites

Mylife100

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 05/12/12Posts: 17Char no Tibia: Splinter

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 +

gustavo121

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 07/12/11Posts: 34Char no Tibia: Pegue Se Possivel

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.

semttulo3fk.jpg

AlexandreKG

Estudante de TI
avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 30/10/11Posts: 1153Gênero: Masculino

Resolvido?

Piabeta Kun

Ex-Coordenador de Websites
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 23/12/08Posts: 2403Gênero: MasculinoChar no Tibia: Gordo Warlike

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!

Daijobu!

 

Mylife100

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 05/12/12Posts: 17Char no Tibia: Splinter

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

AlexandreKG

Estudante de TI
avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 30/10/11Posts: 1153Gênero: Masculino

Use o xampp 1.8.1

Piabeta Kun

Ex-Coordenador de Websites
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 23/12/08Posts: 2403Gênero: MasculinoChar no Tibia: Gordo Warlike

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

 

Aguardo!

Daijobu!

 

Mylife100

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 05/12/12Posts: 17Char no Tibia: Splinter

Duvida Senada.

 

Problema resolvido:

 

Uso do Wampp Server

 

 

REP + para Ambos xD

AlexandreKG

Estudante de TI
avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 30/10/11Posts: 1153Gênero: Masculino

Dúvida sanada!

 

Movido!

 

Obrigado aos que ajudaram!

Mylife100

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 05/12/12Posts: 17Char no Tibia: Splinter

O erro voltou ! =s

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

alguém ajuda ?