[Geomoose-users] Geomoose-users Digest, Vol 44, Issue 10

Michał Chmielewski mich.chmielewski at gmail.com
Wed Mar 18 13:41:18 PDT 2015


About slow printing,

its PHP issu.
Try to change "server_name" from localhost to 127.0.0.1
in settings.ini

Sometimes it helps

On 18 March 2015 at 20:52, <geomoose-users-request at lists.osgeo.org> wrote:

> Send Geomoose-users mailing list submissions to
>         geomoose-users at lists.osgeo.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.osgeo.org/mailman/listinfo/geomoose-users
> or, via email, send a message with subject or body 'help' to
>         geomoose-users-request at lists.osgeo.org
>
> You can reach the person managing the list at
>         geomoose-users-owner at lists.osgeo.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Geomoose-users digest..."
>
>
> Today's Topics:
>
>    1. Re: can not use multiple mapbook.xml files and php        services
>       (TC Haddad)
>    2. Printing timeout (Johnson, Jeremy)
>    3. Re: Printing timeout (Dan Little)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 18 Mar 2015 12:28:13 -0700
> From: TC Haddad <tchaddad at gmail.com>
> To: biswajit giri <biswajit_giri at yahoo.com>
> Cc: "geomoose-users at lists.osgeo.org" <geomoose-users at lists.osgeo.org>
> Subject: Re: [Geomoose-users] can not use multiple mapbook.xml files
>         and php services
> Message-ID:
>         <CAFVrPyikX4BrphQztruNu3AJ183zHxcxowxihcmarGH=
> EcboWw at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hello,
>
> I'm not sure which wiki page you are referring to but it might be out of
> date. Perhaps you can share the URL and we can confirm if the contents are
> current or not?
>
> It has been some time since I tried to use multiple mapbooks (GM 2.6). But
> when I did, I was successful by using the method outlined below. You can
> try and see if you can get it to work with 2.7.x.
>
> Below the instructions, I will also paste the text of the "config.php" file
> that is mentioned,
>
> good luck!
>
> Tanya
>
> ------------------ fwd ------------------------ > >
>
>
> *Modification to use multiple mapbooks*
>
>
>
>  1.    Replace php/config.php with updated version.  This file starts a PHP
> session and looks at a session variable passed by the HTML to set which
> settings.ini file to use.
>
> 2.     In the config folder, make copies of settings.ini and mapbook.xml
> with new names and leave them in the config folder.   For example, they
> could be called ?internal_settings.ini? and ?internal_mapbook.xml?.
>
> 3.     Make a copy of geomoose.html (the main HTML page) and re-name it,
> for example ?internal.php? (note the PHP extension).
>
> 4.    Open ?internal.php? and add the following lines to the very top of
> the file:
>
> <?php
>         session_start();
>
>          $_SESSION['settings'] = 'internal_settings.ini';
> ?>
>
> Note the value for settings is ?internal_settings.ini? ? this will be what
> you called the file in step
>
>  5.    Open ?internal_settings.ini? and set the mapbook name to
> ?internal_mapbook.ini?
>
> Give it a try.  You can also use different CSS files by specifying them in
> the internal.php file.
>
>
> +++++++++++++++++++++++++++++++++++++++
>
> contents of new 'config.php' below
>
> +++++++++++++++++++++++++++++++++++++++
>
> <?php
>
> session_start();
>
> /*Copyright (c) 2009, Dan "Ducky" Little & GeoMOOSE.org
>
> Permission is hereby granted, free of charge, to any person obtaining a
> copy of this software and associated documentation files (the "Software"),
> to deal in the Software without restriction, including without limitation
> the rights to use, copy, modify, merge, publish, distribute, sublicense,
> and/or sell copies of the Software, and to permit persons to whom the
> Software is furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in
> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> DEALINGS IN THE SOFTWARE.*/
>
> #
> # This is meant to allow specific environmental includes for
> # GeoMOOSE 2 PHP Services.  Substantive configuraiton options
> # should be added to settings.ini
> #
>
> /* Check for the required libraries
>  * g2/curl are used for printing. If you're not using printing
>  * you can avoid using these modules.
>  *
>  * mapscript and dbase are used for most operations using them
>  * cannot be avoided
>  */
>
> if(!extension_loaded('gd') && !extension_loaded('gd2')) {
>     dl('php_gd2.'.PHP_SHLIB_SUFFIX);
> }
>
> if(!extension_loaded('curl')) {
>     dl('php_curl.'.PHP_SHLIB_SUFFIX);
> }
>
> if(!extension_loaded('MapScript')) {
>     dl('php_mapscript.'.PHP_SHLIB_SUFFIX);
> }
>
> if(!extension_loaded('dbase')) {
>     dl('php_dbase.'.PHP_SHLIB_SUFFIX);
> }
>
>
> # Load the configration file
> $settings = "settings.ini";
>
> if($_SESSION['settings']) {
>     $settings = $_SESSION['settings'];
> }
>
> $CONFIGURATION = parse_ini_file('../../conf/' . $settings);
>
> function getMapbook() {
>     global $CONFIGURATION;
>     $mapbook = new DOMDocument();
>     $mapbook->load('../../conf/'.$CONFIGURATION['mapbook']);
>     return $mapbook;
> }
>
> function getUsername() {
>     session_start();
>     return $_SESSION['username'];
> }
>
>
> # Select Functionality ONLY works for Mapserver Layers
> function getMapfile($mb, $layerName) {
>     $services = $mb->getElementsByTagName('map-source');
>     $mapfiles = array();
>     for($i = 0; $i < $services->length; $i++) {
>         $service = $services->item($i);
>         $root = $service->getAttribute('name');
>         $layers = $service->getElementsByTagName('layer');
>         for($l = 0; $l < $layers->length; $l++) {
>             $layer = $layers->item($l);
>             $path = $root.'/'.$layer->getAttribute('name');
>             if($path == $layerName) {
>                 return
> $service->getElementsByTagName('file')->item(0)->nodeValue;
>             }
>         }
>     }
>     return null;
> }
>
> # get a source based on it's name
> function getMapSource($mb, $layerName) {
>     $services = $mb->getElementsByTagName('map-source');
>     $mapfiles = array();
>     for($i = 0; $i < $services->length; $i++) {
>         if($services->item($i)->getAttribute('name') == $layerName) {
>             return $services->item($i);
>         }
>     }
>     return null;
> }
>
> //LK Get a CONFIGURATION parameter from the Mapbook
> function getParam($mb, $paramTest) {
>     $paramValue = "null";
>     $configuration = $mb->getElementsByTagName('configuration');
>     $params = $configuration->item(0)->getElementsByTagName('param');
>     for($i = 0; $i < $params->length; $i++) {
>         $param = $params->item($i);
>         if($param->getAttribute("name") == $paramTest) {
>             $paramValue = $param->firstChild->nodeValue;
>         }
>     }
>     return $paramValue;
> }
> ?>
>
>
> On Tue, Mar 3, 2015 at 11:16 AM, biswajit giri <biswajit_giri at yahoo.com>
> wrote:
>
> > All the users
> > Really need all of your help.
> > I am using geomoose 2.7.1-ms4w. the problem is I cannot use multiple
> > mapbooks using multiple settings.ini files as mentioned in the geomoose
> > wiki.
> > Even I tried alternative options such as avoid the getmapbook.php file
> > then send the mapbook.xml file as url as mentioned by some users. it is
> > fine but php services are not working.
> > Please somebody help me to overcome this problem. personally I like the
> > geomoose wiki solution but helpless.
> >
> > Biswajit Giri
> > CAD centre
> > Jadavpur University
> > Kolkata, India
> >
> > _______________________________________________
> > Geomoose-users mailing list
> > Geomoose-users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/geomoose-users
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.osgeo.org/pipermail/geomoose-users/attachments/20150318/8c1147fa/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Wed, 18 Mar 2015 14:26:03 -0500
> From: "Johnson, Jeremy" <JJohnson at ci.blaine.mn.us>
> To: <geomoose-users at lists.osgeo.org>
> Subject: [Geomoose-users] Printing timeout
> Message-ID:
>         <
> 9FA30ED3B4259844981A874EAB65D7B40A3AFA98 at chexch3.blainech.ci.blaine.mn.us>
>
> Content-Type: text/plain; charset="us-ascii"
>
> I am currently using Geomoose 2.6 and since I upgraded, it seems it is
> taking longer for the printing service to generate the highest quality
> prints.  Even without aerial photos, just parcel lines, it can take up
> to 30 seconds to get the output option to pop up.  I went into the
> php.in to adjust the max_execution_time to 60 seconds, for a temporary
> fix (I don't think I want this to stay there for end user experience).
> Any suggestions?  Thank you.
>
>
>
> Jeremy Johnson, GISP
>
> G.I.S. Coordinator
>
> Certified Crime Analyst
>
> City of Blaine
>
> 10801 Town Square Dr Ne
>
> Blaine, MN  55449
>
> (763) 717-2639
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.osgeo.org/pipermail/geomoose-users/attachments/20150318/ab7f2649/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 3
> Date: Wed, 18 Mar 2015 14:52:50 -0500
> From: Dan Little <theduckylittle at gmail.com>
> To: "Johnson, Jeremy" <JJohnson at ci.blaine.mn.us>
> Cc: GeoMOOSE Users List <geomoose-users at lists.osgeo.org>
> Subject: Re: [Geomoose-users] Printing timeout
> Message-ID:
>         <
> CABqPoBYiw4NEoGJi+Phmc9xe5W+XW_Sm1Bo+kRq4ttjmz1i_tQ at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> I don't have any immediate ideas on this.  Can you file a GitHub ticket?
>
> On Wed, Mar 18, 2015 at 2:26 PM, Johnson, Jeremy
> <JJohnson at ci.blaine.mn.us> wrote:
> > I am currently using Geomoose 2.6 and since I upgraded, it seems it is
> > taking longer for the printing service to generate the highest quality
> > prints.  Even without aerial photos, just parcel lines, it can take up
> to 30
> > seconds to get the output option to pop up.  I went into the php.in to
> > adjust the max_execution_time to 60 seconds, for a temporary fix (I don?t
> > think I want this to stay there for end user experience).  Any
> suggestions?
> > Thank you.
> >
> >
> >
> > Jeremy Johnson, GISP
> >
> > G.I.S. Coordinator
> >
> > Certified Crime Analyst
> >
> > City of Blaine
> >
> > 10801 Town Square Dr Ne
> >
> > Blaine, MN  55449
> >
> > (763) 717-2639
> >
> >
> >
> >
> > _______________________________________________
> > Geomoose-users mailing list
> > Geomoose-users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/geomoose-users
>
>
> ------------------------------
>
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geomoose-users
>
> End of Geomoose-users Digest, Vol 44, Issue 10
> **********************************************
>



-- 
Michał Chmielewski
mich.chmielewski at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20150318/fb92a33a/attachment-0001.html>


More information about the Geomoose-users mailing list