[FWTools] fwtools 1.1.3 mapserver running on tomcat/cgi on windows

Frank Warmerdam warmerdam at pobox.com
Sat Jan 13 01:56:44 EST 2007

Dave Potts wrote:
>    I have been using mapserver on unix from under tomcat invoked by a 
> cgi    script.
>    I have ported the entire system to windows
>    I invoke mapserver from fwtools by calling the following script
>    call "C:\program files\fwtools1.1.3\setfw.bat"
>    call "C:\program files\fwtools1.1.3\bin\mapserv.exe"
>    I receive the error msEvalRegex(): Regular expression error.    
> String(../../maps/en-gb_dsk_manor.map) failed expression test
>    The file name ../../maps/en-gb_dsk_manor.map is my map parmeter file.
>    I don't understand WHY its doing this


Mapserv.exe has (optionally?) some sort of mechanism to test map names
against a regular expression to avoid people using funky urls to
select files not intended to be used.  The above seems like it might
be this error, but my understanding was that by default this
test just verified that the extension was ".map" so perhaps the
issue is elsewhere.

>    Invoke my script directly ie
>    Correctly generates the string 'No query information to decode.    
> QUERY_STRING is set, but is empty." so I known that mapserver is being 
>    invoked correctly.
>    Using the argument
>    results in the error message msProcessProjection(): library error. No 
>    such file or directory (The results are the same if I url encode the 
>    path, ie swop the / character for a %2F)
>       I have used the file setfw.bat to set up the work envronment for 
>    mapserv, is there any other type of set up file, or varible that 
> should    be set ?

How did you use setfw.bat to setup the work environment for mapserv?
The problem I have using FWTools mapserv.exe on windows is that I
have never been able to figure out how to have a script invoke a batch
file which can run setfw.bat before running mapserv.exe.  Have you found
a way of doing this?  Keep in mind that running setfw.bat in a command
window will have no effect on the global environment which is what
would be inherited by a cgi launched by apache (I assume).

Well, all that aside, I think the problem is that PROJ_LIB isn't set
when mapserv.exe runs, and this is producing your error message.

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org

More information about the FWTools mailing list