OGR failing on Linux with Premature end of script headers
McGraw, Joanne
mcgrawj at AGR.GC.CA
Tue May 23 11:46:49 PDT 2006
Thank you, Frank, Ethan and Steve for your responses regarding this problem. The issue has been solved thanks to your help!!
It turned out that the libgdal library that was being used was one that was compiled with a previous version and never upgraded along with our upgrades to MapServer. That's been fixed. Our current version of MapServer is now finding its correct corresponding version of libgdal.so and all's right with the world (well my world anyway).
Thanks again for your help!!
jtm
Joanne T. McGraw
GIS Data Analyst / Analyste des données du SIG
National Land and Water Information Service/Service national sur les terres et les eaux
Agriculture and Agri-Food Canada / Agriculture et Agroalimentaire Canada
Telephone/Téléphone: 613 759-6103
Facsimile/Télécopieur: 613 759-1937
960 Carling Ave, Bldg. 20, Rm. 1136
Ottawa, Ontario
K1A 0C6
mcgrawj at agr.gc.ca
www.agr.gc.ca/nlwis-snite
-----Original Message-----
From: McGraw, Joanne
Sent: Thursday, May 18, 2006 4:46 PM
To: 'Ethan Alpert'; MAPSERVER-USERS at LISTS.UMN.EDU
Subject: RE: [UMN_MAPSERVER-USERS] OGR failing on Linux with Premature end of script headers
Thanks for the script, Ethan. I'll keep it for the future. Frank's last suggestion allowed me to see that we are not pointing to the same library MapServer was compiled with. I'll need to talk to the system administrator tomorrow about this.
Thanks everyone! I'll let you know how it goes...
jtm
Joanne T. McGraw
GIS Data Analyst / Analyste des données du SIG
Agriculture and Agri-Food Canada / Agriculture et Agroalimentaire Canada
Telephone/Téléphone: 613 759-6103
Facsimile/Télécopieur: 613 759-1937
960 Carling Ave, Bldg. 20, Rm. 1136
Ottawa, Ontario
K1A 0C6
mcgrawj at agr.gc.ca
www.agr.gc.ca/nlwis-snite
-----Original Message-----
From: Ethan Alpert [mailto:ealpert at digitalglobe.com]
Sent: Thursday, May 18, 2006 4:39 PM
To: McGraw, Joanne; MAPSERVER-USERS at LISTS.UMN.EDU
Subject: RE: [UMN_MAPSERVER-USERS] OGR failing on Linux with Premature end of script headers
Here's a little PHP script you can put in your document root to see what the environment variables are for apache. If you don't have access to httpd.conf your going to have trouble unless you can install your shared libraries in a path apache already knows about.
<?php
$vars = Array('GET', 'POST', 'COOKIE', 'SERVER', 'ENV', 'REQUEST', 'SESSION');
$php_version = preg_replace("/[^\d]/", '', phpversion());
for($i=0; $i<sizeof($vars); $i++) {
echo "<h1>HTTP_{$vars[$i]}_VARS</h1>";
if(is_array(${"HTTP_{$vars[$i]}_VARS"})) {
echo '<table border=1>';
foreach(${"HTTP_{$vars[$i]}_VARS"} as $var=>$val) {
echo "<tr><td>$var</td><td>$val</td></tr>";
if($php_version<410) {
$GLOBALS["_{$vars[$i]}"][$var] = $val;
}
unset($$key);
}
echo '</table>';
}
unset(${"HTTP_{$vars[$i]}_VARS"});
}
?>
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of McGraw, Joanne
Sent: Thursday, May 18, 2006 2:19 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] OGR failing on Linux with Premature end of script headers
I did. There's about six of them. I don't have access to the Apache config files.
Joanne T. McGraw
GIS Data Analyst / Analyste des données du SIG
Agriculture and Agri-Food Canada / Agriculture et Agroalimentaire Canada
Telephone/Téléphone: 613 759-6103
Facsimile/Télécopieur: 613 759-1937
960 Carling Ave, Bldg. 20, Rm. 1136
Ottawa, Ontario
K1A 0C6
mcgrawj at agr.gc.ca
www.agr.gc.ca/nlwis-snite
-----Original Message-----
From: Stephen Woodbridge [mailto:woodbri at swoodbridge.com]
Sent: Thursday, May 18, 2006 4:17 PM
To: McGraw, Joanne
Cc: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] OGR failing on Linux with Premature end of script headers
Try "locate libgdal" which should show you where all copies of files
with libgdal in the name are located on your system.
-Steve
McGraw, Joanne wrote:
> Hi Frank,
> Nice to hear from you! Hope all is well down your way. No gloating about the Senators loss.
>
> I tried your suggestion and didn't get any additional information:
>
> [mcgrawj at siswebdev temp]$/server/dev4.wms1/bin/shp2img -m /data/dev1.wms1.www/htdocs/gdas/temp/map1147200518.map -o junk.png
> Segmentation fault
> [mcgrawj at siswebdev temp]$
>
> I'm trying to track down which version of libgdal.so we're actually pointing to, but will have to wait to talk to the configuration manager for that machine. I feel it is entirely possible (likely?) that old versions of the libraries are being used.
>
> Thanks for the suggestion.
> jtm
>
> Joanne T. McGraw
> GIS Data Analyst / Analyste des données du SIG
> Agriculture and Agri-Food Canada / Agriculture et Agroalimentaire Canada
> Telephone/Téléphone: 613 759-6103
> Facsimile/Télécopieur: 613 759-1937
> 960 Carling Ave, Bldg. 20, Rm. 1136
> Ottawa, Ontario
> K1A 0C6
>
> mcgrawj at agr.gc.ca
> www.agr.gc.ca/nlwis-snite
>
>
> -----Original Message-----
> From: Frank Warmerdam [mailto:fwarmerdam at gmail.com] On Behalf Of Frank Warmerdam
> Sent: Thursday, May 18, 2006 3:44 PM
> To: McGraw, Joanne
> Cc: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] OGR failing on Linux with Premature end of script headers
>
> McGraw, Joanne wrote:
>
>>LAYER NAME "ecozones" DATA "ecozones"
>>
>># CONNECTION "/ms4w_1.4.0/Apache/htdocs/dev1/data/ecozones.shp" #
>>CONNECTIONTYPE OGR # DATA "SELECT * FROM ecozones"
>>
>>: END
>>
>>In the browser, when I enter the following URL with the above definition,
>>the image appears fine:
>>http://host/cgi-bin/mapserv?map=/server_path/Apache/htdocs/map_nojoin.map&mode=map&layer=ecozones
>>
>>
>>However, if I comment the 'DATA "ecozones"' line and uncomment the lines
>>referring to OGR, the image displays correctly from a Windows server; so,
>>I'm fairly confident the syntax in the file is fine. But, the same map file
>>(with a different path to the ecozones.shp file obviously) gives the
>>"Premature end of script headers" error.
>>
>>Any pointers as to how I can identify what is causing the error are greatly
>>appreciated. I'm stuck!
>
>
> Joanne,
>
> You might want to try "shp2img" on your map file as it will generally give
> you better error messages. In fact, I usually see specific messages for
> missing shared libraries in my Apache error_log, so I'm surprised you don't
> see more details. Perhaps an old OGR (libgdal.so) is getting picked up
> in your case and this is causing a crash without details.
>
> Good luck,
More information about the MapServer-users
mailing list