[mapserver-users] Building Mapserver + (PHP Mapscript) for Anaconda's Environment
Hi Mapservers, I have become dependent on Anaconda's distribution for my OSS GIS stack, so I wanted to find a way to get mapserver to build using all of its provided libraries. I wrote up my current experience here: http://iemblog.blogspot.com/2017/11/building-mapserver-with-anaconda-conda.html Of course, the trick is how to make PHP mapscript work, since having Anaconda provide a full PHP stack makes little sense. It seems with a small LD_PRELOAD hack, I was able to get php-fpm to at least work. Hopefully somebody else has already figured this out and knows the 'right-way' to do this :) My google-foo seems to not indicate that this has been publized before. I have not fully groked conda-forge's recipe foo to attempt to upstream this there, but I would certainly help out if others have interest. I don't know how we'd handle PHP-mapscript tho for conda-forge :) daryl -- /** * daryl herzmann * Systems Analyst III -- Iowa Environmental Mesonet * https://mesonet.agron.iastate.edu */ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Draw PHP labels
Hello, Instead of: $oAirportsClass-label-set(size, 10); do: $oAirportsClass-getLabel(0)-set(size, 10); http://mapserver.org/mapscript/php/phpmapscript.html#classobj daryl On Wed, Aug 21, 2013 at 12:48 PM, Michael McInnis mmcinni...@msn.comwrote: Dear mapservers! My map fails to draw when I attempt to add labels from my labelitem icao. Any attempt at using the label objects causes failure. I think I need to create a label object somehow before I use set() but can't find any examples on line. // The following occurs near the bottom of my php code snippet and is commented to allow a successful draw. $oAirportsClass-label-set(size, 10); Can someone point me to a working example of drawing labels for a layer? Thanks // Layer 3 airports // Point Symbol $nSymbolId = ms_newSymbolObj($oMap, circle); $oSymbol = $oMap-getsymbolobjectbyid($nSymbolId); $oSymbol-set(type, MS_SYMBOL_ELLIPSE); $oSymbol-set(filled, MS_TRUE); $aPoints[0] = 1; $aPoints[1] = 1; $oSymbol-setpoints($aPoints); // Layer $oLayerAirports = ms_newLayerObj($oMap); $oLayerAirports-setConnectionType(MS_POSTGIS); $oLayerAirports-set(name, airports); $oLayerAirports-set(type, MS_LAYER_POINT); $oLayerAirports-set(status, MS_DEFAULT); $oLayerAirports-set(labelitem, icao); //$oLayerAirports-set(classitem, MyAirports); $oLayerAirports-set(connection, host=xxx port= dbname= user= password=); $oLayerAirports-set(data, geom From (select a.icao, geom From airports a left join airportdata e on a.icao = e.icao where e.icao Is Not Null) as subquery using unique icao using srid=4326); // Class with Labels $oAirportsClass = ms_newClassObj($oLayerAirports); $oAirportsClass-set(name,MyAirports); // Style $airportsStyle = ms_newStyleObj($oAirportsClass); $airportsStyle-color-setRGB(255, 22, 22); $airportsStyle-set(symbolname, circle); $airportsStyle-set(size, 3); //$oAirportsClass-label-set(size, 10); //$oAirportsClass-label-color-setRGB(0,0,0); Michael McInnis 6033 44th Ave. N.E. Seattle, WA 98115 206 517-4701 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] 6.2.0 fastcgi exit(lifetime expired), get signal 11, possible coredump generated
Hi, I recently updated to mapserver 6.2.0 and am noticing an interesting message being logged from Apache: Jan 25 08:40:49 xxx httpd[6098]: [error] mod_fcgid: process /path/mapserv.fcgi(4498) exit(lifetime expired), get signal 11, possible coredump generated I built mapserver on RHEL6.3 with fcgi-2.4.0-10.el6.x86_64 . These messages appear to be happening when Apache mod_fcgid cycles the mapserver process every so often? Any ideas what is happening? I suspect it is safe to ignore the message, but am curious why I am seeing it now and not with previous mapserver releases. thanks, daryl ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] php mapscript 6.2.0 problem plotting TRANSFORM false rectobj
Hi, The follow code worked for me with previous Mapserver releases, it currently does not with PHP mapscript 6.2.0 on RHEL6 64bit. Any ideas what I may be doing wrong? The result is a blank image and I expect to see a black rectangle! -- rect.map MAP NAME base4326 STATUS ON SIZE 640 480 EXTENT -104 37 -87 49 UNITS DD CONFIG MS_ERRORFILE /tmp/ms_error.txt CONFIG CPL_DEBUG ON DEBUG 5 LAYER NAME rect TYPE POLYGON TRANSFORM FALSE STATUS ON LABELCACHE FALSE CLASS COLOR 0 0 0 END END END --- rect.php $map = ms_newMapObj('rect.map'); $img = $map-prepareImage(); $layer = $map-getLayerByName(rect); $rect = ms_newRectObj(); $rect-setextent(100,100,200,200); $rect-draw($map, $layer, $img, 0, ); header(Content-type: image/png); $img-saveImage(''); thanks, daryl ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] php extension
On Mon, Aug 13, 2012 at 11:32 AM, Jeff Lake ad...@michiganwxsystem.com wrote: hey Daryl... centos 5.8 64bit ldd /usr/lib64/php/modules/php_mapscript.so linux-vdso.so.1 = (0x7fff1e29a000) libexpat.so.0 = /lib64/libexpat.so.0 (0x2aef63c38000) libgd.so.2 = /usr/lib64/libgd.so.2 (0x2aef63e5b000) libjpeg.so.62 = /usr/lib64/libjpeg.so.62 (0x2aef640b) libfreetype.so.6 = /usr/lib64/libfreetype.so.6 (0x2aef642d1000) libpng12.so.0 = /usr/lib64/libpng12.so.0 (0x2aef64555000) libz.so.1 = /lib64/libz.so.1 (0x2aef6477a000) libstdc++.so.6 = /usr/lib64/libstdc++.so.6 (0x2aef6498e000) libm.so.6 = /lib64/libm.so.6 (0x2aef64c8e000) libc.so.6 = /lib64/libc.so.6 (0x2aef64f12000) libgcc_s.so.1 = /lib64/libgcc_s.so.1 (0x2aef65269000) libXpm.so.4 = /usr/lib64/libXpm.so.4 (0x2aef65477000) libX11.so.6 = /usr/lib64/libX11.so.6 (0x2aef65689000) libfontconfig.so.1 = /usr/lib64/libfontconfig.so.1 (0x2aef65995000) /lib64/ld-linux-x86-64.so.2 (0x00310ce0) libXau.so.6 = /usr/lib64/libXau.so.6 (0x2aef65bca000) libXdmcp.so.6 = /usr/lib64/libXdmcp.so.6 (0x2aef65dcc000) libdl.so.2 = /lib64/libdl.so.2 (0x2aef65fd1000) Did you build mapscript yourself? Maybe you could try installing the giflib giflib-devel package and rebuild? daryl ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] php extension
On Mon, Aug 13, 2012 at 8:19 AM, Jeff Lake ad...@michiganwxsystem.com wrote: mapserver is working, decided to give the php extension a whirl but this error has me baffled PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_mapscript.so' - /usr/lib64/php/modules/php_mapscript.so: undefined symbol: DGifGetScreenDesc in Unknown on line 0 Jeff, Which operating system? What does ldd /usr/lib64/php/modules/php_mapscript.so report? daryl ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] problem installing mapscript
Hello Worth, Welcome to Mapserver! On Sat, 3 Jul 2010, Worth Lutz wrote: This is my first time trying to install mapserver without using a package. I have not found a RPM for mapserver 5.6.3 for RHEL5 I downloaded mapserver and did the configure and make. After installing all the missing libs I thought I had it done. After copying moving php_mapscript.so to the proper location, I find that upon restarting apache it does not load. Here is the message from the error log. ---snip--- PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_mapscript.so' - libgeos-3.2.0.so: cannot open shared object file: No such file or directory in Unknown on line 0 ---snip--- This is a sign that the location you put libgeos-3.2.0.so is not in the system's nor apache's LD_LIBRARY_PATH. If libgeos is in /usr/local/lib, make sure that is in either /etc/ld.so.conf or in a file in /etc/ld.so.conf.d/ . Typically, I do this. echo /usr/local/lib /etc/ld.so.conf.d/usrlocal.conf ldconfig In an effort to correct this, I downloaded and installed libgeos and tried to install it. I also tried to install a rpm with libgeos 3.1.1. If you did this after compiling geos and mapserver, you probably have a conflict going now. /usr/bin/ld: warning: libpq.so.4, needed by /usr/lib64/libgdal.so, may conflict with libpq.so.5 Did you compile gdal or get it from a third party packager? daryl ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] TIme support on mapserver 5.6.3, it's working?
On Thu, 1 Jul 2010, rai 8 wrote: Hello, I've been working with mapserver to get a map with time support, time parameter, I followed the tutorial in documetation http://mapserver.org/ogc/wms_time.html and this post http://osgeo-org.1803224.n2.nabble.com/Accessing-images-using-time-dimension-td1991324.html#a1991324 and I can't run the mapserver to change the image with a time parameter. I test several configurations but any works, the last is the same like the post in the maillist, this is what i've done: in a postgis database create table satellite (image_path text, image_time timestamp); select AddGeometryColumn('satellite', 'the_geom', 4326, 'POLYGON', 2); insert into satellite (image_path, image_time, the_geom) values ('/home/vbox/Downloads/animacio/sat1.tif', '2007-05-11 10:00Z', GeomFromText('POLYGON((-31.82 75.55, -31.82 26.5, 51.31 26.5,51.31 75.55, -31.82 75.55))', 4326)); insert into satellite (image_path, image_time, the_geom) values ('/home/vbox/Downloads/animacio/sat2.tif', '2007-05-11 11:00Z', GeomFromText('POLYGON((-31.82 75.55, -31.82 26.5, 51.31 26.5,51.31 75.55, -31.82 75.55))', 4326)); and the map file: LAYER NAMEtime_w TYPEPOLYGON STATUSON CONNECTIONTYPE POSTGIS CONNECTIONdbname=tile_index host=127.0.0.1 user=postgres password=xx DATAthe_geom from satellite using unique oid using srid = 4326 METADATA wms_titletime_index_w wms_srsEPSG:4326 wms_timeextent2007-01-01/2007-12-31 wms_timedefault 2007-05-11T11:00:00Z wms_timeitemimage_time #a column in postgis table of type END END LAYER NAMEsat_w STATUS ON TYPERASTER METADATA wms_titleSatellite wms_timeextent2007-01-01/2007-12-31 END PROJECTION init=epsg:4326 END TILEINDEX time_w # Layer name containing time index TILEITEM image_path # DB column containing path to image END anyone finds some error? Could you provide an example URL you are using to test out the WMS-T? I am using WMS-T on 5.6.3 without any known issues. Please note that if your time table gets very large, you may hit this quirk: http://trac.osgeo.org/mapserver/ticket/3038 daryl ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users