Re: [mapserver-users] Premature end of script headers: mapserv

2010-01-10 Thread Rahkonen Jukka
Hi,

If I understood right mol is the name you have given at MAP level.  I do not 
know if using layers=mol should really work or not, I have never tried it that 
way.  I use wms_titles advertised at layer lever, either comma separated list 
or layers=all.

Try what happens when using layers=all.  If it fails add DEBUG 5 into layer 
definitions and have a look at ms_errorfile after doing some failing requests.

-Jukka-


-Alkuperäinen viesti-
Lähettäjä: Shaz N [mailto:geo.engineer...@gmail.com]
Lähetetty: su 10.1.2010 7:31
Vastaanottaja: Rahkonen Jukka
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] Premature end of script headers: mapserv
 
Hi..

I added the new shapefiles to PostGIS using shp2pgsql etc and it was
successful. After that, in my mapfile, I included a new layer for each of
these shapefiles. What I copy-pasted in my mail was the layer that I added
in my mapfile.

I have included WMS metadata in the beginning of the mapfile:
WEB
IMAGEURL /tmp/
IMAGEPATH /tmp/ms_tmp/
  METADATA
wms_title MOL  ##required
wms_onlineresource .   ##required
wms_srs   EPSG:2060  ##recommended
 END

I was getting a good output using WMS request:
http://../cgi-bin/mapserv?map=/data//tmapSERVICE=WMSVERSION=1.1.1REQUEST=getmaplayers=molSTYLES=SRS=epsg:2060FORMAT=image/jpegWIDTH=600HEIGHT=500BBOX=332271.136,2800048.4565,335043.0915,2803465.287

As I kept adding new layers, I suddenly started getting an Internal server
error on my browser. When I checked the error log, it read: Premature end of
script headers: mapserv.
All the new layers were similar to each other, with only different NAME
and DATA. But the internal server error would just not go unless I reduced
the total number of layers in my mapfile.

shp2img works fine and I get an output. What doesnt work is the WMS. Works
when I reduce the total number of layers in my mapfile. Is there a maximum
number of layers or classes that we can use? I use version 5.0

After reading the latest reply, I added WMS metadata to the layers also,
but WMS still doesnt work.

Please help.
Thanku v much..

On Sun, Jan 10, 2010 at 2:56 AM, Rahkonen Jukka
jukka.rahko...@mmmtike.fiwrote:

 Hi,

 You talk about adding a shapefile but the layer definitions below are for
 PostGIS layer. Have you copy-pasted another layer or what? The main problem
 could be that the layer in your mail is missing entries for WMS metadata.
 Try reading and following the document at
 http://mapserver.org/ogc/wms_server.html.

 -Jukka Rahkonen-

 Shaz N wrote:

  Hi users..



  I have been adding a few new shapefiles to my existing map file. I am a
 facing a new problem since last evening. I added 9 shapefiles successfully
 and could view the map in the browser. While adding the 10th shapefile I
 got
 an error. All the new shapefiles are simple point shapefiles.

 Example: LAYER

NAME 'sc'

CONNECTIONTYPE postgis

CONNECTION  

DATA the_geom from sc

TEMPLATE dummy.html

DEBUG ON

TYPE POINT

MAXSCALE 1

MINSCALE 2000

STATUS DEFAULT

LABELITEM name

LABELCACHE ON



CLASS

  MAXSCALE 1

  MINSCALE 2000



STYLE

  ANTIALIAS TRUE

  SYMBOL square

  SIZE 9

  COLOR 153 0 102

  OUTLINECOLOR 255 255 255

END #end style



LABEL

  ANGLE auto

  COLOR 153 0 102

  ANTIALIAS TRUE

  FONT vera_sans-bold

  TYPE TRUETYPE

  SIZE 9

  POSITION auto

  PARTIALS false

  BUFFER 1

END #end label

END#end class

 END #end layer



 This is the error from the error log:



 Premature end of script headers: mapserv



 And this is what I got using WMS get map request on the browser:

 Internal Server Error

 The server encountered an internal error or misconfiguration and was unable
 to complete your request.

 Please contact the server administrator, [no address given] and inform them
 of the time the error occurred, and anything you might have done that may
 have caused the error.

 More information about this error may be available in the server error log.



 I checked the shapefile and map file for errors and couldn't find any. And
 mapserver has been installed correctly and has been working well. The
 problem only arises when I add the extra layer. It works well with all the
 existing ones.

 The map file works on my PHP map display page but when I try it using WMS
 it
 does not work.



 I use MapServer 5.0.



 Any help would be greatly appreciated.

 Thanks in advance.



___
mapserver-users mailing list

Re: [mapserver-users] Premature end of script headers: mapserv

2010-01-10 Thread Jeff McKenna

Rahkonen Jukka wrote:

Hi,

If I understood right mol is the name you have given at MAP level.  I do not know if 
using layers=mol should really work or not, I have never tried it that way.  I use 
wms_titles advertised at layer lever, either comma separated list or layers=all.

Try what happens when using layers=all.  If it fails add DEBUG 5 into layer 
definitions and have a look at ms_errorfile after doing some failing requests.

-Jukka-



Just to follow up on Jukka's excellent advice: passing the MAP name in 
the LAYERS parameter in a WMS GetMap request is an undocumented trick to 
return a map image of all layers, from MapServer.


I would follow Jukka's advice.  I would start with a GetCapabilities 
request, make sure no warnings or errors are reported there, then 
request each layer by name through a WMS GetMap...that way you can 
narrow your problem down to one layer.  Once you have that one problem 
layer, remove all other layers from your mapfile, then try again.  If 
same problem occurs, then try to access that shapefile (not loaded into 
PostGIS) by a GetMap request - if the raw shapefile works then you might 
have a problem with PostGIS and you can focus your attention there.


Hope this helps a little.

-jeff


--
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Premature end of script headers: mapserv

2010-01-10 Thread Ben Madin
I have had similar errors in the past, and almost invariably it was a postgis 
query error. Follow Jukka's advice - debug 5 for both the map and the layer, 
and look in the log.

cheers

Ben




On 11/01/2010, at 1:00 , mapserver-users-requ...@lists.osgeo.org wrote:

 If I understood right mol is the name you have given at MAP level.  I do 
 not know if using layers=mol should really work or not, I have never tried 
 it that way.  I use wms_titles advertised at layer lever, either comma 
 separated list or layers=all.
 
 Try what happens when using layers=all.  If it fails add DEBUG 5 into 
 layer definitions and have a look at ms_errorfile after doing some failing 
 requests.
 
 -Jukka-
 
 
 -Alkuperäinen viesti-
 Lähettäjä: Shaz N [mailto:geo.engineer...@gmail.com]
 Lähetetty: su 10.1.2010 7:31
 Vastaanottaja: Rahkonen Jukka
 Kopio: mapserver-users@lists.osgeo.org
 Aihe: Re: [mapserver-users] Premature end of script headers: mapserv
 
 Hi..
 
 I added the new shapefiles to PostGIS using shp2pgsql etc and it was
 successful. After that, in my mapfile, I included a new layer for each of
 these shapefiles. What I copy-pasted in my mail was the layer that I added
 in my mapfile.
 
 I have included WMS metadata in the beginning of the mapfile:
 WEB
IMAGEURL /tmp/
IMAGEPATH /tmp/ms_tmp/
  METADATA
wms_title MOL  ##required
wms_onlineresource .   ##required
wms_srs   EPSG:2060  ##recommended
 END
 
 I was getting a good output using WMS request:
 http://../cgi-bin/mapserv?map=/data//tmapSERVICE=WMSVERSION=1.1.1REQUEST=getmaplayers=molSTYLES=SRS=epsg:2060FORMAT=image/jpegWIDTH=600HEIGHT=500BBOX=332271.136,2800048.4565,335043.0915,2803465.287
 
 As I kept adding new layers, I suddenly started getting an Internal server
 error on my browser. When I checked the error log, it read: Premature end of
 script headers: mapserv.
 All the new layers were similar to each other, with only different NAME
 and DATA. But the internal server error would just not go unless I reduced
 the total number of layers in my mapfile.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Premature end of script headers: mapserv

2010-01-09 Thread Dan Little
Try testing it with shp2img and see if you still get the same error.  Also, you 
may need to try the whole thing under GDB or with debugging turned on.


From: Shaz N geo.engineer...@gmail.com
To: mapserver-users@lists.osgeo.org
Sent: Fri, January 8, 2010 11:27:12 PM
Subject: [mapserver-users] Premature end of script headers: mapserv


Hi users..
 
I have been adding a few new shapefiles to my existing map file. I am a facing 
a new problem since last evening. I added 9 shapefiles successfully and could 
view the map in the browser. While adding the 10th shapefile I got an error. 
All the new shapefiles are simple point shapefiles. 
Example: LAYER
NAME 'sc'
CONNECTIONTYPE postgis
CONNECTION  
DATA the_geom from sc
TEMPLATE dummy.html
DEBUG ON
TYPE POINT
MAXSCALE 1
MINSCALE 2000
STATUS DEFAULT
LABELITEM name
LABELCACHE ON
 
CLASS
  MAXSCALE 1
  MINSCALE 2000

STYLE
  ANTIALIAS TRUE
  SYMBOL square
  SIZE 9
  COLOR 153 0 102
  OUTLINECOLOR 255 255 255
END #end style

LABEL
  ANGLE auto
  COLOR 153 0 102
  ANTIALIAS TRUE
  FONT vera_sans-bold
  TYPE TRUETYPE
  SIZE 9
  POSITION auto
  PARTIALS false
  BUFFER 1
END #end label
END#end class
END #end layer
 
This is the error from the error log:
 
Premature end of script headers: mapserv
 
And this is what I got using WMS get map request on the browser:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to 
complete your request.
Please contact the server administrator, [no address given] and inform them of 
the time the error occurred, and anything you might have done that may have 
caused the error.
More information about this error may be available in the server error log.
 
I checked the shapefile and map file for errors and couldn’t find any. And 
mapserver has been installed correctly and has been working well. The problem 
only arises when I add the extra layer. It works well with all the existing 
ones. 
The map file works on my PHP map display page but when I try it using WMS it 
does not work.  

I use MapServer 5.0.
  
Any help would be greatly appreciated. 
Thanks in advance.  


  ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Premature end of script headers: mapserv

2010-01-09 Thread Rahkonen Jukka
Hi,

You talk about adding a shapefile but the layer definitions below are for 
PostGIS layer. Have you copy-pasted another layer or what? The main problem 
could be that the layer in your mail is missing entries for WMS metadata. Try 
reading and following the document at http://mapserver.org/ogc/wms_server.html. 

-Jukka Rahkonen-

Shaz N wrote:

 Hi users..



 I have been adding a few new shapefiles to my existing map file. I am a
facing a new problem since last evening. I added 9 shapefiles successfully
and could view the map in the browser. While adding the 10th shapefile I got
an error. All the new shapefiles are simple point shapefiles.

Example: LAYER

NAME 'sc'

CONNECTIONTYPE postgis

CONNECTION  

DATA the_geom from sc

TEMPLATE dummy.html

DEBUG ON

TYPE POINT

MAXSCALE 1

MINSCALE 2000

STATUS DEFAULT

LABELITEM name

LABELCACHE ON



CLASS

  MAXSCALE 1

  MINSCALE 2000



STYLE

  ANTIALIAS TRUE

  SYMBOL square

  SIZE 9

  COLOR 153 0 102

  OUTLINECOLOR 255 255 255

END #end style



LABEL

  ANGLE auto

  COLOR 153 0 102

  ANTIALIAS TRUE

  FONT vera_sans-bold

  TYPE TRUETYPE

  SIZE 9

  POSITION auto

  PARTIALS false

  BUFFER 1

END #end label

END#end class

END #end layer



This is the error from the error log:



Premature end of script headers: mapserv



And this is what I got using WMS get map request on the browser:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable
to complete your request.

Please contact the server administrator, [no address given] and inform them
of the time the error occurred, and anything you might have done that may
have caused the error.

More information about this error may be available in the server error log.



I checked the shapefile and map file for errors and couldn't find any. And
mapserver has been installed correctly and has been working well. The
problem only arises when I add the extra layer. It works well with all the
existing ones.

The map file works on my PHP map display page but when I try it using WMS it
does not work.



I use MapServer 5.0.



Any help would be greatly appreciated.

Thanks in advance.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Premature end of script headers: mapserv

2010-01-09 Thread Shaz N
Hi..

I added the new shapefiles to PostGIS using shp2pgsql etc and it was
successful. After that, in my mapfile, I included a new layer for each of
these shapefiles. What I copy-pasted in my mail was the layer that I added
in my mapfile.

I have included WMS metadata in the beginning of the mapfile:
WEB
IMAGEURL /tmp/
IMAGEPATH /tmp/ms_tmp/
  METADATA
wms_title MOL  ##required
wms_onlineresource .   ##required
wms_srs   EPSG:2060  ##recommended
 END

I was getting a good output using WMS request:
http://../cgi-bin/mapserv?map=/data//tmapSERVICE=WMSVERSION=1.1.1REQUEST=getmaplayers=molSTYLES=SRS=epsg:2060FORMAT=image/jpegWIDTH=600HEIGHT=500BBOX=332271.136,2800048.4565,335043.0915,2803465.287

As I kept adding new layers, I suddenly started getting an Internal server
error on my browser. When I checked the error log, it read: Premature end of
script headers: mapserv.
All the new layers were similar to each other, with only different NAME
and DATA. But the internal server error would just not go unless I reduced
the total number of layers in my mapfile.

shp2img works fine and I get an output. What doesnt work is the WMS. Works
when I reduce the total number of layers in my mapfile. Is there a maximum
number of layers or classes that we can use? I use version 5.0

After reading the latest reply, I added WMS metadata to the layers also,
but WMS still doesnt work.

Please help.
Thanku v much..

On Sun, Jan 10, 2010 at 2:56 AM, Rahkonen Jukka
jukka.rahko...@mmmtike.fiwrote:

 Hi,

 You talk about adding a shapefile but the layer definitions below are for
 PostGIS layer. Have you copy-pasted another layer or what? The main problem
 could be that the layer in your mail is missing entries for WMS metadata.
 Try reading and following the document at
 http://mapserver.org/ogc/wms_server.html.

 -Jukka Rahkonen-

 Shaz N wrote:

  Hi users..



  I have been adding a few new shapefiles to my existing map file. I am a
 facing a new problem since last evening. I added 9 shapefiles successfully
 and could view the map in the browser. While adding the 10th shapefile I
 got
 an error. All the new shapefiles are simple point shapefiles.

 Example: LAYER

NAME 'sc'

CONNECTIONTYPE postgis

CONNECTION  

DATA the_geom from sc

TEMPLATE dummy.html

DEBUG ON

TYPE POINT

MAXSCALE 1

MINSCALE 2000

STATUS DEFAULT

LABELITEM name

LABELCACHE ON



CLASS

  MAXSCALE 1

  MINSCALE 2000



STYLE

  ANTIALIAS TRUE

  SYMBOL square

  SIZE 9

  COLOR 153 0 102

  OUTLINECOLOR 255 255 255

END #end style



LABEL

  ANGLE auto

  COLOR 153 0 102

  ANTIALIAS TRUE

  FONT vera_sans-bold

  TYPE TRUETYPE

  SIZE 9

  POSITION auto

  PARTIALS false

  BUFFER 1

END #end label

END#end class

 END #end layer



 This is the error from the error log:



 Premature end of script headers: mapserv



 And this is what I got using WMS get map request on the browser:

 Internal Server Error

 The server encountered an internal error or misconfiguration and was unable
 to complete your request.

 Please contact the server administrator, [no address given] and inform them
 of the time the error occurred, and anything you might have done that may
 have caused the error.

 More information about this error may be available in the server error log.



 I checked the shapefile and map file for errors and couldn't find any. And
 mapserver has been installed correctly and has been working well. The
 problem only arises when I add the extra layer. It works well with all the
 existing ones.

 The map file works on my PHP map display page but when I try it using WMS
 it
 does not work.



 I use MapServer 5.0.



 Any help would be greatly appreciated.

 Thanks in advance.


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users