Yes this is usually a shared library problem. Check your LD_LIBRARY_PATH environment variable is set in the apache httpd.conf file. It's not surprising that ogrinfo would work at the command line but ogr would fail when apache calls it. The apache user has a different environment.
-e -----Original Message----- From: UMN MapServer Users List [mailto:[EMAIL PROTECTED] On Behalf Of McGraw, Joanne Sent: Wednesday, May 17, 2006 1:52 PM To: [email protected] Subject: [UMN_MAPSERVER-USERS] OGR failing on Linux with Premature end of script headers Hi all, I am trying to load a MAP file that does a JOIN to connect a shapefile with a geolinked dbf. But, when I try to load the map file in a browser from our Linux server, I get a "Premature end of script headers: mapserv" in the Apache error_log. I've read a bunch of posts to the forum and all seem to suggest that "Premature end of script headers" messages are usually the result of libraries not being loaded properly. How can I learn what library is missing or not properly loading? I don't get any additional message helping to identify this in Apache's error_log. I've done a little testing and find that just using OGR seems to be the problem. I've created a simple map file with a single layer in it and set the following attributes: 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! Cheers, 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
