[MAPSERVER-USERS] Mapserv problems on Fedora

Daniel Morissette dmorissette at mapgears.com
Tue Apr 29 10:39:15 EDT 2008


Sounds as if there might be two different copies of the regex library 
involved in the build, and the wrong one would be used at runtime and 
result in regex evaluations failing. This used to happen with PHP 
MapScript when MapServer was compiled with the system regex and PHP was 
compiled with its built-in regex. I realize that you are using mapserv 
in this case and not PHP MapScript so it's not related to PHP at all, 
but I would suggest that you look to make sure there is not another 
dependency in your build that pulls a second copy of regex into the mix.

Daniel

Philippe Kruschitz wrote:
> 
> Do you think overriding the default mapfile pattern ("\\.map$") by setting 
> MS_MAPFILE_PATTERN could be a solution?
> 
> (though I still don't get why the regular expression returns as false,
> the path in the URL obviously fits the default pattern...??)
> 
> Philippe
> 
> 
> 
> Philippe Kruschitz wrote:
>>
>> Hi Steven,
>>
>> Thanks for the hint. I'm glad it worked for you, although I doubt this has
>> anything to do with AGG.
>> Usually, trying to access non-existent mapfiles throws a LoadMap error:
>>
>> msLoadMap(): Unable to access file. (/home/pk/gis/no.map)
>>
>> Trying with non-existent and working mapfiles (using GD rendering) always
>> gets me the same error:
>>
>> [http://localhost/cgi-bin/mapserv?map=no.map]
>> msEvalRegex(): Regular expression error. String (no.map) failed expression
>> test.
>>
>> [http://localhost/cgi-bin/mapserv?map=/home/pk/gis/no.map]
>> msEvalRegex(): Regular expression error. String (/home/pk/gis/no.map)
>> failed expression test.
>>
>> [http://localhost/cgi-bin/mapserv?map=/home/pk/gis/test.map]
>> msEvalRegex(): Regular expression error. String (/home/pk/gis/test.map)
>> failed expression test.
>>
>>
>> To be sure, I recompiled Mapserver without agg support, getting the same
>> result.
>> I'm slowly considering switching to an Ubuntu server, as I tried almost
>> everything I could.
>>
>> By the way, how did you find out about your bug?
>>
>> Best regards,
>>
>> Philippe
>>
>>
>>
>>
>>
>> Stephen Woodbridge wrote:
>>> Philippe,
>>>
>>> My regex crash was because of a bug in mapserver
>>> http://trac.osgeo.org/mapserver/ticket/2577#comment:8
>>>
>>> which has been fixed now in svn. It was specifically related to a crash 
>>> cause when AGG FORMATOPTION PALETTE=<file> could not open <file>.
>>>
>>> Hope this helps,
>>>    -Steve W
>>>
>>> Philippe Kruschitz wrote:
>>>>> You --must-- compile and install the last version of
>>>>> gd, the gd version on RHEL 5 and 5.1 is broken, also
>>>>> on centos and fedora core 8.
>>>>>
>>>>> Be sure to replace the old gd version on /usr/lib,
>>>>> also check the simlinks on /usr/lib, then run ldconfig
>>>>> as root.
>>>>>
>>>>> If you use mapserver with phpmapscript install php-gd
>>>>> with yum.
>>>>>
>>>>> Hope this helps.
>>>>>
>>>>> Saludos.
>>>>>
>>>>> --
>>>>> Nahum Castro
>>>>> Leon, Guanajuato, Mexico
>>>>> http://www.leon-linux.com
>>>>> e-mail: pedro1_72 [en] yahoo [punto] com
>>>>
>>>> I did pretty much everything you said before compiling mapserver (i
>>>> didn't
>>>> have mapscript, though).
>>>>
>>>> I tried to to change the malloc value, as frank warmerdam suggested,
>>>> with
>>>> exactly the same result as stephen woodbridge: the crash is fixed, but
>>>> the
>>>> regular expression systematically fails.....
>>>>
>>>> Anyone has an idea? Did Stephen fixed it?
>>>>
>>>> Regards,
>>>>
>>>> Phil
>>>>
>>>>
>>>>
>>>> Quote S. Woodbridge:
>>>>
>>>> Hi Frank,
>>>>
>>>> Adding more to to the malloc fixed the crash, but the regex is failing
>>>> :( and should be ok:
>>>>
>>>> Breakpoint 1, msEvalRegex (e=0x4e9873 "\\.map$",
>>>>      s=0x7232a0 "/u/data/maps/google-agg.map") at mapfile.c:79
>>>>
>>>> ...
>>>>
>>>> 89        if(ms_regexec(&re, s, 0, NULL, 0) != 0) { /* no match */
>>>> (gdb) p ms_regexec(&re, s, 0, 0, 0)
>>>> $1 = 1
>>>> (gdb) c
>>>> Continuing.
>>>> Content-type: text/html
>>>>
>>>> <HTML>
>>>> <HEAD><TITLE>MapServer Message</TITLE></HEAD>
>>>> <!-- MapServer version 5.0.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG
>>>> OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE
>>>> SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER INPUT=EPPL7
>>>> INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->
>>>> <BODY BGCOLOR="#FFFFFF">
>>>> msEvalRegex(): Regular expression error. String
>>>> (/u/data/maps/google-agg.map) failed expression test.
>>>> </BODY></HTML>
>>>> Program exited normally.
>>>>
>>>>
>>>> This should NOT be happening. Arrrgh!
>>>> Anyone else using fc8 on a x86_84 box?
>>>>
>>>> -Steve
>>>>
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>>
>>
> 


-- 
Daniel Morissette
http://www.mapgears.com/


More information about the mapserver-users mailing list