Hi!
answer for
http://www.mail-archive.com/[email protected]/msg00999.html
:
this is not op system resource limit problem, but pmappar bug, which
currntly exists!
In initgroups.php the function _initResultFields and function
_initResultHeaders
open the $maplay, but not close!
The file squery.php in function setNumResults() and function
dumpQueryResults() the same.
When i see with unix command lsof many opened shapes exists.
Every time pamapper query reopen the shapes.
My solution is in initgroups.php:
function setNumResults()
{
$this->qLayer->open(); $this->numResults =
$this->qLayer->getNumResults();
// Apply limit for query results
if ($this->numResults > $this->limitResult) $this->numResults =
$this->limitResult;
//BUG
$this->qLayer->close(); }
function _initResultFields($map, $mapLay, $mapLayType) {
$metaString = $this->_returnMetaData($mapLay, "RESULT_FIELDS");
if ($metaString != "") {
$metaList = split(",", $metaString);
} else {
if ($mapLayType != 3) {
$mapLay->open(); $metaList =
$mapLay->getItems();
//BUG
$mapLay->close(); } else {
$metaList = array();
}
}
return $metaList; }
function _initResultHeaders($map, $mapLay, $mapLayType) {
$metaString = $this->_returnMetaData($mapLay, "RESULT_HEADERS");
if ($metaString != "") {
$metaList0 = split(",", $metaString);
foreach ($metaList0 as $m) {
$metaList[] = _p(trim($this->mapStringEncode($m)));
}
} else {
if ($mapLayType != 3) {
$mapLay->open(); $metaList =
$mapLay->getItems();
//BUG
$mapLay->close();
} else {
$metaList = array();
}
}
return $metaList; }
--------------------------------------------------------------------
and in squery.php:
/**
* DUMP QUERY RESULTS INTO QUERY STRING $qStr
*******************************************************/
function dumpQueryResults()
{
if ($this->zoomFull) {
// Maximum extents
$this->mExtMinx = 999999999;
$this->mExtMiny = 999999999;
$this->mExtMaxx = -999999999;
$this->mExtMaxy = -999999999;
}
$this->returnTableJoinProperties();
$this->setNumResults();
//BUG
$this->qLayer->open(); //error_log($this->numResults);
for ($iRes=0; $iRes < $this->numResults; $iRes++) {
$qRes = $this->qLayer->getResult($iRes);
$qShape =
$this->qLayer->getShape($qRes->tileindex,$qRes->shapeindex);
$this->qStr .= $this->printResultRow($qShape);
$this->qStr .= $iRes < ($this->numResults - 1) ? ", " : "";
$this->resultindexes[] = $qRes->shapeindex;
$this->resulttileindexes[$qRes->shapeindex] = $qRes->tileindex;
}
//error_log($this->qStr);
//BUG
$this->qLayer->close();
}
Szabolcs Klement
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
pmapper-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pmapper-users