I tried your sequence on my mapfile and it worked. My original code was missing this at the bottom:
ms_iogetStdoutBufferBytes(); I'd been experimenting with header(...) and ms_ioresethandlers() but not necessarily at the same time, and without the "Bytes" func. I need to go back and read the descriptions of these ms_io funcs. many thanks, Robert Yewondwossen Assefa <[EMAIL PROTECTED]> wrote: Robert, what does you php script looks like? Quick test I did with a png output and works looks like this: request : http://localhost/msapps/wxs/test.php?SERVICE=WMS&VeRsIoN=1.1.1&Request=GetMap&LAYERS=WorldGen_Outline&FORMAT=png&WIDTH=400&HEIGHT=300&SRS=EPSG:4326&FORMAT=png&WIDTH=400&HEIGHT=300&STYLES=&BBOX=-180.0,-90.0,180.0,90.0&SLD=http://localhost/msapps/world_testdata/tests/sld_tests/sld_line_multi_filter.xml test.php dl("php_mapscript.dll"); $request = ms_newowsrequestobj(); $request->loadparams(); ms_ioinstallstdouttobuffer(); $oMap = ms_newMapobj("f:/msapps/world_testdata/map/world_testdata.map"); $oMap->owsdispatch($request); $contenttype = ms_iostripstdoutbuffercontenttype(); //if ($contenttype == 'image/png') header('Content-type: image/png'); ms_iogetStdoutBufferBytes(); ms_ioresethandlers(); ?> Best Regards ROBERT HOLLINGSWORTH wrote: > Hello, > I've loaded latest MS4W 2.x (therefore PHP 5.x) > and am trying to verify Mapscript's > OwsRequestObj and $mapobj->owsdispatch() > on a fairly ordinary shp-based mapfile > that works well where mapserv.exe is > the WMS server. > > The requestobj seems healthy and > owsdispatch seems successful on WMS > GetCapabilities. On a GetMap, > owsdispatch is returning MS_SUCCESS, > but all the image output formats are > coming thru damaged or truncated in > some way. When running GetMap > in a browser, there are corruption > messages for PNG and GIF, > while JPG displays as a very "disturbed" > image that gdalinfo indicates is currupted. > > The docs suggest that owsdispatch() should > be able to dump the image to the client without > further manipulation, so I don't know what I > might be missing. > > Or if my environment is somehow tainted from > older MS4Ws (on PHP 4). I uninstalled the old > apache that I was using and installed the new > MS4W in c:\ to be as generic as possible. > > Any ideas out there? > > thanks, > Robert H. > > > ------------------------------------------------------------------------ > > _______________________________________________ > mapserver-users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: [EMAIL PROTECTED] http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ----------------------------------------------------------------
_______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
