[PHP/MapScript]: How to change size of query map

Sebastian Albrecht albrecht at FIELAX.DE
Wed Feb 22 11:00:02 PST 2006


Hi Mark,

> Yes, the querymapObj is only present in 4.8. In terms of debugging your
> problem with 4.8, can you isolate the problem? For example, does it still
> occur if you change the output format to JPEG temporarily?

I got closer to the problem's core but not close enough yet.


The problem with the internal server error in my web application results 
of one layer that gets data from a local WMS. Until today it worked all 
well with image/png as format type.

If I send a simple GetMap request to that WMS now some kind of PNG image 
is returned which can only be interpreted by Mozilla Firefox. GIMP and 
different other programs say the image is corrupted. In the Apache log 
it says:

gd-png:  fatal libpng error: IDAT: CRC error
gd-png error: setjmp returns error condition
gd-jpeg: JPEG library reports unrecoverable error: Not a JPEG file: 
starts with 0x89 0x50

I don't know what that jpeg stuff means - the WMS should simply render a 
shape file to PNG.


And to make the problem more complicated:
If I switch off the WMS layer in my webbrowser application the rest 
works well - as PNG!


Here are my map file definitions for the WMS server. In the WMS client 
layer definition I tried "image/png" and "image/png; mode=24bit" as 
format type. The resulting images differ but are both "corrupted".

IMAGETYPE png

OUTPUTFORMAT
   NAME png
   DRIVER "GD/PNG"
   MIMETYPE "image/png"
   IMAGEMODE RGB
   EXTENSION "png"
END


Updating to the latest libpng did not change anything. GD is 2.0.33.


I finish for today - perhaps I'll have some luck tomorrow. But if it 
does not work, I will have to get back to 4.6.1 and do without my nice 
tiny query maps... :-/


Best regards

Sebastian



More information about the MapServer-users mailing list