[mapserver-users] msEvalRegex problem (Mapserver 5.2.2)

Steve Lime Steve.Lime at dnr.state.mn.us
Wed Apr 22 08:30:17 PDT 2009


Hi Dominik: The extension for queryfiles should be .qy not .qry. The .qy is 
what the CGI writes. I missed the fact the mapscript allows the user to specify
their own extension. Versions 5.2.2 and up enforce that. Argh...

How to fix. Couple of options:

  - tweak fusion to write queries using .qy as an extension
  - tweak MapServer to recognize .qry as a legitimate extension

To do the later you can edit mapquery.c, line 127 and change:

  if(msEvalRegex("\\.qy$", filename) != MS_TRUE) return MS_FAILURE;

to:

  if(msEvalRegex("\\.(qy|qry)$", filename) != MS_TRUE) return MS_FAILURE;

If I knew there were a couple of common extensions being used out there I could
update this pattern in 5.4.1.

Steve

>>> Dominik Schmid <dominik.schmid at ilu.ch> 04/22/09 10:14 AM >>>
Hi list

once again I have to turn to the list as a last resort after having  
depleted all possible solutions which I've come across. We're running  
Mapserver/PHP/Mapscript/Fusion on a CentOS installation which we've  
recently upgraded to 5.3. The upgrade has so far been successful  
except for one problem:

When I compile Mapserver 5.2.2 or 5.4.0RC2 (with mapscript support)  
against the updated libraries etc. the resulting mapserv works fine  
(as far as tested) except when I select a feature (through the Fusion  
web map application, all data is pulled from the postgres database) it  
throws an error like:

msEvalRegex(): Regular expression error. String (/var/lib/php/session/ 
sess_49ef23ad8b84e/query.qry) failed expression test.

If I compile Mapserver 5.2.0 on the same upgraded system this works  
fine as it had before on the original system (Centos 4.4).

I always used the correct php_mapscript.so and did a proper httpd  
restart.

Originally I had GDAL 1.4 compiled on the system, tried with removal  
and changing to the EPEL-Version (1.4.2) and after further failure  
tried with removal (also removing librx) and compiling GDAL 1.6.0 from  
source which didn't change a thing. I did this after reading some  
threads on this list ( http://lists.osgeo.org/pipermail/mapserver-users/2008-April/055638.html 
  ).

Some more version details:
- php 5.2.6 (from the C5-testing repo)
- postgresql 8.2.9 (from the C5-testing repo)
- postgis 1.3.1

Generally I tried to avoid the installation from turning into a  
frankenbuild system but since the offical repos don't provide all our  
needs I had to resort to rolling my own in some cases.


Any hint is greatly appreciated.

Best regards
Dominik


--
Dominik Schmid
Dipl. Umweltnaturwissenschafter ETH

ilu AG
Zentralstrasse 2a
CH-8610 Uster

Tel: +41 44 / 944 55 56    (Direktwahl)
Tel: +41 44 / 944 55 55    (allgemein)
Fax: +41 44 / 944 55 66

mailto:dominik.schmid at ilu.ch
http://www.ilu.ch




_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users




More information about the MapServer-users mailing list