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:[EMAIL PROTECTED] On Behalf Of McGraw,
Joanne
Sent: Thursday, May 18, 2006 2:19 PM
To: [email protected]
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
[EMAIL PROTECTED]
www.agr.gc.ca/nlwis-snite
-----Original Message-----
From: Stephen Woodbridge [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 18, 2006 4:17 PM
To: McGraw, Joanne
Cc: [email protected]
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:
>
> [EMAIL PROTECTED] temp]$/server/dev4.wms1/bin/shp2img -m
> /data/dev1.wms1.www/htdocs/gdas/temp/map1147200518.map -o junk.png
> Segmentation fault
> [EMAIL PROTECTED] 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
>
> [EMAIL PROTECTED]
> www.agr.gc.ca/nlwis-snite
>
>
> -----Original Message-----
> From: Frank Warmerdam [mailto:[EMAIL PROTECTED] On Behalf Of Frank Warmerdam
> Sent: Thursday, May 18, 2006 3:44 PM
> To: McGraw, Joanne
> Cc: [email protected]
> 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,