[Geomoose-users] Re: Identify & popup issues

Efstathios Arapostathis e.arapostathis at gmail.com
Wed Dec 7 11:38:21 EST 2011


It's already  uncommented..
Any ideas?



*Config.php:*


<?php
/*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
$CONFIGURATION = parse_ini_file('../../conf/settings.ini');

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;
}




?>




On Mon, Dec 5, 2011 at 6:52 PM, Eli Adam <eadam at co.lincoln.or.us> wrote:

> Since you are using PHP 5.2.4 I don't think that is an issue, but in
> later PHP versions, dl has been removed,
>
> http://us2.php.net/manual/en/function.dl.php
>
>
> Eli
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geomoose-users/attachments/20111207/b44b0b44/attachment.html


More information about the Geomoose-users mailing list