Install pmapper

Quick install instructions for p.mapper 3.0

For more detailed documentation see the p.mapper manual

PHP Settings

PHP/MapScript Library and WebServer

Install the PHP/MapScript library in the appropriate place and configure your webserver to parse *.php and *.phtml files with PHP. Name the PHP/Mapscript extension accoring to the mapserver version, like php_mapscript_48.so (or php_mapscript_48.dll on Windows) for MapServer 4.8 See the documentation for PHP/MapScript and MapServer for details.

LIBICONV

PHP needs to be compiled with support of the ICONV library. This should be the default on Windows and Unix versions of PHP

PHP.INI

Under section [PHP] for Error handling and logging set

error_reporting = E_ALL & ~E_NOTICE

log_errors = On

error_log = ...: Set a valid file name writable by the webserver user. IMPORTANT!!!

See the PHP Manual for more details. In section [PHP] under the paragraph Paths and Directories set:

enable_dl = On

alternatively: load the Mapscript extension via the php.ini. This is also the required method on Windows both for IIS and Apache running PHP as module. The application uses PHP sessions to store user settings during the session. Modify the php.ini file to the following settings below section [Session]:

session.save_path = ... : Set a valid path writable by the webserver user

session.use_trans_sid = 0 : set to 0 in order to be compliant with W3C XHTML Strict

session.auto_start = 0

Note that for p.mapper 1 you have to set session.use_trans_sid to 1

Application settings

config/config.ini The main configuration for p.mapper is set under the subdirectory config in the file config.ini. Adapt following mandatory settings to your environment:

msVersion: e.g. for php_mapscript_48.so set to 48, for php_mapscript_4.10.0.dll set to 4.10.0

This setting can only be skipped if the php_mapscript extension is loaded via the php.ini (see above). mapFile: Map file location; 2 possibilities:

1) use absolute path to map file in file system (use slashes instead of backslashes) 2) filename only, if map file is under the directory specified at ‘pm_config_location’ (NEW in p.mapper 2.1.0)

allGroups: a comma-separated list of layers/groups available in the application
useCategories: if set to 1 the thematic categories and the assigned layers/groups

               have to be defined in "php_config.php"

General rule: if a layer belongs to a group, use the group name, otherwise use the layer name

Other settings

Directory /images/legend/

This directory has to be writeable for the user that runs the web server (used for automatic update of legend icons). On a Debian system for example, this could be achieved with the command

chown -R www-data /var/www/pmapper_demo/images/legend/

On Windows and IIS set the directory security properties to ‘Modify’ for user IUSR_hostname

Demo data

You can download the demo dataset (demodata.zip) and test p.mapper with the supplied map file pmapper_demo.map.

Map file

in pmapper_demo.map adapt settings for

MAP

  SHAPEPATH

  (FONTSET)

  (SYMBOLSET)WEB

  IMAGEPATH

  IMAGEURL

Start p.mapper

Starting p.mapper can be done via the map.phtml file or a link from index.html.

Share on Facebook
This entry was posted in pmapper. Bookmark the permalink.

2 Responses to Install pmapper

  1. koda says:

    mas, klo errornya seperti ini diapain yaa … ???

    >>>>
    Warning: dl() [function.dl]: Unable to load dynamic library ‘/ms4w/Apache/php/extensions/php_mapscript.dll’ – The specified procedure could not be found. in C:ms4wApachehtdocspmapperincphpglobals.php on line 49

    Fatal error: Call to undefined function: ms_newmapobj() in C:ms4wApachehtdocspmapperincphpglobals.php on line 58

  2. Adi says:

    Mas,mo tanya kalo pmapper otomatis delete point of interest gimana caranyanya?
    kalo nda manual hapusnya..

    soalnya aku pengen kalo udah gak dibutuhin POInya bisa dihapus.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>