[mapserver-users] Corrupted zipped shapefiles from WFS
Jeff McKenna
jmckenna at gatewaygeomatics.com
Wed Nov 2 10:43:25 PDT 2011
Hi Keith,
I know for a similar issue I created a small test case posted to a
ticket last week
(http://trac.osgeo.org/mapserver/ticket/3751#comment:21) and in that
case I was able to output a valid zip archive of a shapefile through a
WFS GetFeature request on Windows. If I remember correctly I had to use
MapServer trunk to get this to work properly.
Honestly I didn't dive far into if the zips were valid or not (come to
think of it, I was always using 7-zip to open them as well, which worked).
-jeff
--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/
On 11-11-02 3:50 AM, Keith Moss wrote:
> Hi list,
>
> We're having a bit of an issue with the zipped shapefiles we're getting back
> from WFS GetFeature requests. Winzip claims that they're all corrupted* but,
> oddly, 7zip can open and extract the perfectly valid shapefile without
> issue. We tried to unzip the file with PHP's inbuilt ZIPArchive class, but
> that also had issues - it could read the files in there but would extract
> 0KB length files.
>
> Other output formats - CSV, GML, etc - work without issue. We've reproduced
> the issue on two separate Windows-based servers (2008& 2003).
>
> We've noticed in the corrupted zip files that the file starts with:
> "Content-Disposition: attachment; filename=result.zip
> Content-Type: application/zip" (when we open it in Notepad). We've tried
> removing this, but it didn't help.
>
> Can anyone on the list, or one of the developers, shed any light on the
> situation?
>
> I've attached a simple test case with an example shapefile, would someone be
> able to try it on their setup for us please?
>
> We're using PHP MapScript with MapServer 6.0.1 (MS4W 3.0.3) / PHP 5.3.6.
>
> * The WinZip error: "error [<path>.zip]: start of central directory not
> found; Zip file corrupt."
>
> http://osgeo-org.1803224.n2.nabble.com/file/n6954263/shapezip.zip
> shapezip.zip
>
More information about the MapServer-users
mailing list