MapTools.org

[Chameleon-dev] [Bug 323] New: [Chameleon] MapFile path in index.phtml required to be absolute

bugzilla-daemon@www.maptools.org bugzilla-daemon@www.maptools.org
Tue, 23 Mar 2004 16:15:34 -0500
http://www.maptools.org/bugzilla/show_bug.cgi?id=323

           Summary: [Chameleon] MapFile path in index.phtml required to be
                    absolute
           Product: Chameleon
           Version: 1.1
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: chameleon-dev@lists.maptools.org
        ReportedBy: jfournier@dmsolutions.ca


When referring to your mapfile in index.phtml of a Chameleon application you
must specify your path absolutely.  If it is not specified with an absolute path
then a specific portion of map_session.php does not get executed (as per below):

lines 206 to 222 of map_session.php

        if ($szMapFilePath != "" && is_dir($szMapFilePath))
        {
            if (strncasecmp( "lmx.", strrev($szMapFile), 4 ) == 0)
            {
                $this->oMap = ms_newMapObj( "" );
                $this->oMap->loadMapContext( $szMapFile );
            }
            else
            {
                $this->oMap = ms_newMapObj($szMapFile, $szMapFilePath);
            }
        }
        else
        {
            // set the map object to be the phpmapscript map object
            $this->oMap = ms_newMapObj($szMapFile);
        }

map_ession should call the line that has ms_newMapObj($szMapFile,
$szMapFilePath); but it calls the last line in the if, the one with
ms_newMapObj($szMapFile);.  Missing the original mapfile path is what causes
MapServer to output an error.  What needs to be figured out is why the wrong
part of the if() is executed.

Note that using an absolute path DOES work.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


This archive was generated by Pipermail.