Commit 299a3fd56e597b222dfeb6eaf75886c690ac4731
1 parent
7cbf851f
Exists in
master
and in
7 other branches
Correção nos valores de timeout e eliminação de erro_reporting na função de acesso à WMS
Showing
3 changed files
with
12 additions
and
2 deletions
Show diff stats
classesphp/classe_analise.php
... | ... | @@ -135,7 +135,7 @@ Include: |
135 | 135 | */ |
136 | 136 | function analiseDistriPt($locaplic,$dir_tmp,$R_path,$numclasses,$tipo,$cori,$corf,$tmpurl,$sigma="",$limitepontos="TRUE",$tema2="",$extendelimite=5) |
137 | 137 | { |
138 | - set_time_limit(180); | |
138 | + set_time_limit(120); | |
139 | 139 | // |
140 | 140 | //pega os dados do tema dois para as funções que o utilizam |
141 | 141 | // | ... | ... |
classesphp/mapa_controle.php
... | ... | @@ -119,6 +119,10 @@ if ($funcao != "criaMapa") |
119 | 119 | if (isset($debug) && $debug == "sim") |
120 | 120 | {error_reporting(0);} |
121 | 121 | // |
122 | +//teste de timeout | |
123 | +// | |
124 | +//for($i==0;$i<5000000000;$i++){} | |
125 | +// | |
122 | 126 | //ativa o php mapscript e as extensões necessárias |
123 | 127 | //se as extensões já estiverem carregadas no PHP, vc pode comentar essa linha para que o processamento fique mais rápido |
124 | 128 | // | ... | ... |
classesphp/wmswfs.php
... | ... | @@ -47,13 +47,16 @@ Nome do arquivo criado |
47 | 47 | function gravaCacheWMS($servico) |
48 | 48 | { |
49 | 49 | global $dir_tmp; |
50 | + error_reporting(0); | |
51 | + try{ | |
50 | 52 | $teste = explode("=",$servico); |
51 | 53 | if ( count($teste) > 1 ){$servico = $servico."&";} |
52 | 54 | $wms_service_request = $servico . "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1"; |
53 | 55 | $nome = $dir_tmp."/wms".md5($servico).".xml"; |
54 | 56 | if(!file_exists($nome)) |
55 | 57 | { |
56 | - if( !($wms_capabilities = file($wms_service_request)) ) | |
58 | + $wms_capabilities = file($wms_service_request); | |
59 | + if( !$wms_capabilities ) | |
57 | 60 | {return "erro";} |
58 | 61 | else |
59 | 62 | { |
... | ... | @@ -63,6 +66,8 @@ function gravaCacheWMS($servico) |
63 | 66 | } |
64 | 67 | } |
65 | 68 | return $nome; |
69 | + } | |
70 | + catch(Exception $e){return "erro";} | |
66 | 71 | } |
67 | 72 | /* |
68 | 73 | function: existeTemaWFS |
... | ... | @@ -386,6 +391,7 @@ function listaLayersWMS() |
386 | 391 | $wms_service_request = gravaCacheWMS($servico); |
387 | 392 | include_once("../admin/php/admin.php"); |
388 | 393 | include_once("../admin/php/webservices.php"); |
394 | + error_reporting(0); | |
389 | 395 | if($nivel < 2){ |
390 | 396 | if($wms_service_request == "erro") { |
391 | 397 | //registra a tentativa de acesso | ... | ... |