Re: [pmapper-users] Searchitem Postgis problem

2013-03-25 Thread Chris forum
Hi Marcos,

You can trust Sourceforge, the version you are using is the right one
4.3.0. I guess it's just an omission in defaults.xml.

I just tried it on my p.mapper 4.3 project (with PostGIS2).
At first I got the same error: PHP Fatal error:  require_once(): Failed
opening required 'MDB2.php'

Then, as said in the manual
http://svn.pmapper.net/trac/wiki/DocManual(additional PHP settings),
I had to install the PEAR, the MDB2 package and
the pgsql driver.
(Had a PHP Deprecated error, which the latest MDB2 beta MDB2-2.5.0b5
solved).

That was kind of straight forward to install that on Linux, hope it will be
the same for Windows.

Cheers,
Chris


On Fri, Mar 22, 2013 at 7:35 PM, Marcos Bastos
marcosnbas...@yahoo.com.brwrote:

 Hi, Chris.

 I downloaded the file pmapper-4.3.0-ms4w.zip at address
 http://sourceforge.net/projects/pmapper/files/p.mapper 204/4.3.0% / (I
 wrote the wrong link in the previous email) . I made adjustments to the
 application to this version (4.3) but the problem persists (as attached
 image).

 I thought it strange that the Windows version, both in package pmapper-
 4.3.0-ms4w.zip as in pmapper-4.3.0.zip, the file pmapper-4.3.0.zip \
 pmapper-4.3.0 \ config \ common \ . _startup_ \. DEFAULTS.XML has the
 tags:
 - pmapper pmTitle p.mapper 4.2 - A MapServer PHP / MapScript Framework
 / pmTitle
 version 4.2 / version

 Does the windows version was not made the upgrade?

 Hug!

 Marcos

*De:* Chris forum bak.fo...@gmail.com
 *Para:* Marcos Bastos marcosnbas...@yahoo.com.br
 *Enviadas:* Sexta-feira, 22 de Março de 2013 10:07

 *Assunto:* Re: [pmapper-users] Searchitem Postgis problem

 Hi

 4.2 doesn't have the Postgis2 modifications from what I know.

 I got 4.3 from there:
 http://sourceforge.net/projects/pmapper/files/p.mapper%204/4.3.0/

 I am on Linux, but I see a 4.3.0-msw4.zip that should be good for you.

 Don't forget to add the pmapper users list in your following messages, so
 that everyone knows if it works better with 4.3 or not. ;-)

 Good luck!
 Chris

 On Fri, Mar 22, 2013 at 1:51 PM, Marcos Bastos marcosnbas...@yahoo.com.br
  wrote:

 Hi!

 I downloaded version 4.3 of  
 http://br-mg6.mail.yahoo.com/neo/%204http://br-mg6.mail.yahoo.com/neo/http://br-mg6.mail.yahoo.com/neo/
 % http://br-mg6.mail.yahoo.com/neo/204http://br-mg6.mail.yahoo.com/neo//
 But the version that is installed that package is version 4.2!! (The
 problem persists with this version 4.3- 4.2 )
 From where you downloaded the version 4.3?
 Here image attached to the application running locally.


 thank you

 Marcos

   - Mensagem encaminhada -
 *De:* Marcos Bastos marcosnbas...@yahoo.com.br
 *Para:* Chris forum bak.fo...@gmail.com
 *Enviadas:* Quinta-feira, 21 de Março de 2013 13:34

 *Assunto:* Re: [pmapper-users] Searchitem Postgis problem

 I think it is version 4.0 of pmapper.
 I'll try to install version 4.3.
 Thank you!

 Marcos

*De:* Chris forum bak.fo...@gmail.com
 *Para:* Marcos Bastos marcosnbas...@yahoo.com.br
 *Cc:* pmapper-users@lists.sourceforge.net 
 pmapper-users@lists.sourceforge.net
 *Enviadas:* Quinta-feira, 21 de Março de 2013 11:45
 *Assunto:* Re: [pmapper-users] Searchitem Postgis problem

 Hi Marcos,

 In his reply to Suman (March 3), Armin says:
 ... *old code in query/squery.php using deprecated Postgis
 functions. This was working with Postgis up to version 1.5.x, but not
 any more with v2.x where the deprecated functions have been removed.

 p.mapper 4.3 should have this fixed thanks to Thomas Raffin.*

 Maybe that is also applying to your problem as you are also using PostGIS
 2.
 What p.mapper version are you using?

 Otherwise, I would have a look at what the error shows:
 Failed opening required 'MDB2.php'

 Regards,
 Chris

 On Thu, Mar 21, 2013 at 1:58 PM, Marcos Bastos
 marcosnbas...@yahoo.com.brwrote:

  Hi!
 
  We have two applications running on pmapper using shape files and the
  information we are migrating to PostgreSQL / PostGIS.
 
  I'm encountering problems in searchitem list showing the following error
  in mesage in the list of values:
 
  b Warning / b: Suggest :: require_once (MDB2.php) [a
  href='suggest.require-once' suggest.require-once / a]: failed to open
  stream: No such file b or directory in C: \ ms4w \ apps \ pmapper \
  registry \ incphp \ query \ suggest.php / b on line b 129 / b br
 /
  b Fatal error / b: Suggest :: require_once () [function.require a
  href='function.require' / a]: Failed opening required 'MDB2.php'
  (include_path = '.; \ ms4w \ Apache \ php \ PEAR ') in b C: \ ms4w \
 apps
  \ pmapper \ registry \ incphp \ query \ suggest.php / b on line b 129
  / b br /
 
  I ask help for this problem, please.
  Thank you.
 
  I'm accessing PostgreSQL 9.2 / PostGIS 2.0 which is installed on another
  machine.
 
  Under the file config_default.xml with searchitem and layer file
  pmapper_demo.map:
  .
  .
  .
  allGroups
  groupquadras/group
  groupperimetro_urbano/group
  grouppatrimonio_josiane/group
  grouppatrimonio

[pmapper-users] Searchitem Postgis problem

2013-03-21 Thread Marcos Bastos
Hi!
 
We have two applications running on pmapper using shape files and the 
information we are migrating to PostgreSQL / PostGIS.
 
I'm encountering problems in searchitem list showing the following error in 
mesage in the list of values​​:
 
b Warning / b: Suggest :: require_once (MDB2.php) [a 
href='suggest.require-once' suggest.require-once / a]: failed to open 
stream: No such file b or directory in C: \ ms4w \ apps \ pmapper \ registry 
\ incphp \ query \ suggest.php / b on line b 129 / b br /
b Fatal error / b: Suggest :: require_once () [function.require a 
href='function.require' / a]: Failed opening required 'MDB2.php' 
(include_path = '.; \ ms4w \ Apache \ php \ PEAR ') in b C: \ ms4w \ apps \ 
pmapper \ registry \ incphp \ query \ suggest.php / b on line b 129 / b 
br /
 
I ask help for this problem, please.
Thank you.
 
I'm accessing PostgreSQL 9.2 / PostGIS 2.0 which is installed on another 
machine.
 
Under the file config_default.xml with searchitem and layer file 
pmapper_demo.map:
.
.
.
allGroups
groupquadras/group 
groupperimetro_urbano/group 
grouppatrimonio_josiane/group 
grouppatrimonio/group 
grouplotes_anotacoes/group 
grouplotes/group 
grouplimite_municipal/group 
grouphidrografia_regiao/group 
grouphidrografia_polilinha/group 
grouprestricoesaeroportuarias/group
/allGroups
.
.
.  
  searchitem name=lotes description=codigo_cartografico
    layer type=postgis name=lotes
   field type=s name=codigo_cartografico 
description=codigo_cartografico wildcard=2
   definition type=suggest connectiontype=db minlength=8 
startleft=1 sort=asc   
    dsn 
encoding=UTF-8pgsql://postgres:postgres@172.17.25.32:5432/gis_municipal/dsn
    
    sqlSELECT codigo_cartografico FROM cadastro.lotes/sql   
   /definition  
   /field
    /layer
  /searchitem
  
--
LAYER
    NAME 'lotes'
    TYPE POLYGON
    METADATA
 DESCRIPTION Lotes
  RESULT_HEADERS Codigo Cartografico, Qt,Quadra, Lote, Logradouro, 
numero,frente, fundo, direita, esquerda, OBS
  RESULT_FIELDS  codigo_cartografico, quarteirao_prop,quadra_prop, 
lote_prop, nome_logradouro, numero_logradouro, detalhe_frente, detalhe_fundo, 
detalhe_direita,detalhe_esquerda, observacao
  END
 
    CONNECTIONTYPE postgis
    CONNECTION dbname=gis_municipal host=172.17.36.67 port=5432 user=postgres 
password=postgres
    DATA the_geom from (SELECT a.*, b.* FROM cadastro.lotes a, cfta_ficha_prop 
b WHERE (select distinct a.codigo_cartografico) = b.cod_cartografico) as 
subquery USING UNIQUE gid USING srid=31983
 
#    DATA the_geom FROM cadastro.lotes USING UNIQUE gid USING srid=31983
    STATUS OFF
    TRANSPARENCY 80
 
    CLASS
   NAME 'lotes' 
   TEMPLATE void
   STYLE
 WIDTH 1 
 OUTLINECOLOR 0 0 0
 COLOR 88 128 122
   END
    END
  END
Below is the configuration of the installation in Win 7 Pro:
MapServer for Windows (MS4W)
The following are included in the base package:
- Apache version 2.2.10
- PHP version 5.2.6
- MapServer 5.2.1 CGI and MapScript (CSharp, Java, PHP, 
  Python)
  
    - support GD 2.0.35, FreeType 2.1.10, GDAL/OGR 1.6.0RC2, 
  PROJ, WMS/WFS, Flash, PDF, ECW3.1, PostGIS, GEOS, 
  libcurl 7.15.1, FastCGI, AGG 2.4
    
- mapserver utilities
- gdal/ogr utilities
- proj.4 utilities
- shp2tile utility
- shapelib utilities
- shpdiff utility
- avce00 utilities
    
- PHP_OGR Extension 1.1.1
    
- OWTChart 1.2.0
- DEMtools utilities
    
MapServer Version Information
-
::
  MapServer version 5.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG 
  OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ 
  SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI 
  SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
  SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER 
  SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS 
  SUPPORTS=RGBA_PNG INPUT=JPEG INPUT=POSTGIS INPUT=OGR
  INPUT=GDAL INPUT=SHAPEFILE
 
MapServer Build Environment
---
Compiled using Howard Butler's `MapServer buildkit`_
  
.. _`MapServer buildkit`: http://www.gatewaygeomatics.com/dl/buildkit/
    
Library Versions Used to build this version of MapServer:
::
    curl-7.15.1
    expat-2.0.1
    fcgi-2.4.0
    fits-3.0.2
    freetype-2.1.10
    fribidi-0.19.1    
    gd-2.0.35
    gdal-1.6.0 RC2
    geos-2.2.3
    gettext-0.13
    hdf5
    jbigkit-1.6
    jpeg-6b
    libecwj2-3.3
    libgeotiff-1.2.3
    libiconv-1.9.1
    libintl-0.11.5
    libpng-1.2.8
    libxml2-2.6.23.win32
    mapserver-5.2.1
    ming-0.2a
    mrsid-6.0.7.1407
    mysql-5.0.18-win32
    netcdf-3.6.1    
    PDFlib-Lite-6.0.2
    php-5.2.6
    postgresql-8.3.3
    proj-4.6.1
    Python-2.5.1
    regex-0.12
    sqlite3    
    SWIG-1.3.33
    tiff-cvs (02/04/08)
    xerces-c-2.7.0
    zlib-1.2.3
    
MapScript

Re: [pmapper-users] Searchitem Postgis problem

2013-03-21 Thread Chris forum
Hi Marcos,

In his reply to Suman (March 3), Armin says:
... *old code in query/squery.php using deprecated Postgis
functions. This was working with Postgis up to version 1.5.x, but not
any more with v2.x where the deprecated functions have been removed.

p.mapper 4.3 should have this fixed thanks to Thomas Raffin.*

Maybe that is also applying to your problem as you are also using PostGIS 2.
What p.mapper version are you using?

Otherwise, I would have a look at what the error shows:
Failed opening required 'MDB2.php'

Regards,
Chris

On Thu, Mar 21, 2013 at 1:58 PM, Marcos Bastos
marcosnbas...@yahoo.com.brwrote:

 Hi!

 We have two applications running on pmapper using shape files and the
 information we are migrating to PostgreSQL / PostGIS.

 I'm encountering problems in searchitem list showing the following error
 in mesage in the list of values:

 b Warning / b: Suggest :: require_once (MDB2.php) [a
 href='suggest.require-once' suggest.require-once / a]: failed to open
 stream: No such file b or directory in C: \ ms4w \ apps \ pmapper \
 registry \ incphp \ query \ suggest.php / b on line b 129 / b br /
 b Fatal error / b: Suggest :: require_once () [function.require a
 href='function.require' / a]: Failed opening required 'MDB2.php'
 (include_path = '.; \ ms4w \ Apache \ php \ PEAR ') in b C: \ ms4w \ apps
 \ pmapper \ registry \ incphp \ query \ suggest.php / b on line b 129
 / b br /

 I ask help for this problem, please.
 Thank you.

 I'm accessing PostgreSQL 9.2 / PostGIS 2.0 which is installed on another
 machine.

 Under the file config_default.xml with searchitem and layer file
 pmapper_demo.map:
 .
 .
 .
 allGroups
 groupquadras/group
 groupperimetro_urbano/group
 grouppatrimonio_josiane/group
 grouppatrimonio/group
 grouplotes_anotacoes/group
 grouplotes/group
 grouplimite_municipal/group
 grouphidrografia_regiao/group
 grouphidrografia_polilinha/group
 grouprestricoesaeroportuarias/group
 /allGroups
 .
 .
 .
   searchitem name=lotes description=codigo_cartografico
 layer type=postgis name=lotes
field type=s name=codigo_cartografico
 description=codigo_cartografico wildcard=2
definition type=suggest connectiontype=db
 minlength=8 startleft=1 sort=asc
 dsn encoding=UTF-8pgsql://
 postgres:postgres@172.17.25.32:5432/gis_municipal/dsn
 sqlSELECT codigo_cartografico FROM cadastro.lotes/sql
/definition
/field
 /layer
   /searchitem


 --
 LAYER
 NAME 'lotes'
 TYPE POLYGON
 METADATA
  DESCRIPTION Lotes
   RESULT_HEADERS Codigo Cartografico, Qt,Quadra, Lote, Logradouro,
 numero,frente, fundo, direita, esquerda, OBS
   RESULT_FIELDS  codigo_cartografico, quarteirao_prop,quadra_prop,
 lote_prop, nome_logradouro, numero_logradouro, detalhe_frente,
 detalhe_fundo, detalhe_direita,detalhe_esquerda, observacao
   END

 CONNECTIONTYPE postgis
 CONNECTION dbname=gis_municipal host=172.17.36.67 port=5432
 user=postgres password=postgres
 DATA the_geom from (SELECT a.*, b.* FROM cadastro.lotes a,
 cfta_ficha_prop b WHERE (select distinct a.codigo_cartografico) =
 b.cod_cartografico) as subquery USING UNIQUE gid USING srid=31983

 #DATA the_geom FROM cadastro.lotes USING UNIQUE gid USING srid=31983
 STATUS OFF
 TRANSPARENCY 80

 CLASS
NAME 'lotes'
TEMPLATE void
STYLE
  WIDTH 1
  OUTLINECOLOR 0 0 0
  COLOR 88 128 122
END
 END
   END
 Below is the configuration of the installation in Win 7 Pro:
 MapServer for Windows (MS4W)
 The following are included in the base package:
 - Apache version 2.2.10
 - PHP version 5.2.6
 - MapServer 5.2.1 CGI and MapScript (CSharp, Java, PHP,
   Python)

 - support GD 2.0.35, FreeType 2.1.10, GDAL/OGR 1.6.0RC2,
   PROJ, WMS/WFS, Flash, PDF, ECW3.1, PostGIS, GEOS,
   libcurl 7.15.1, FastCGI, AGG 2.4

 - mapserver utilities
 - gdal/ogr utilities
 - proj.4 utilities
 - shp2tile utility
 - shapelib utilities
 - shpdiff utility
 - avce00 utilities

 - PHP_OGR Extension 1.1.1

 - OWTChart 1.2.0
 - DEMtools utilities

 MapServer Version Information
 -
 ::
   MapServer version 5.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG
   OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ
   SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI
   SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
   SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER
   SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS
   SUPPORTS=RGBA_PNG INPUT=JPEG INPUT=POSTGIS INPUT=OGR
   INPUT=GDAL INPUT=SHAPEFILE

 MapServer Build Environment
 ---
 Compiled using Howard Butler's `MapServer buildkit`_

 .. _`MapServer buildkit`: http://www.gatewaygeomatics.com/dl/buildkit/

 Library Versions Used to build this version of MapServer: