first time mapserver install, error on empty query

Gregor Mosheh gregor at HOSTGIS.COM
Sun Aug 26 01:32:18 EDT 2007


Tara Athan wrote:

> When I put the URL
> http://www.alt2is.com/cgi-bin/mapserv?
> into my browser I get 500 Server Error

Yup. A code 500 is the general purpose "it crashed!" message. In this 
case...


> ./mapserv -v
> ./mapserv: error while loading shared libraries: libgdal.so.1: cannot 
> open shared object file: No such file or directory

You had mentioned that your installation was under your home directory. 
Not surprisingly, your ISP and their webserver desn't have your home 
directory listed as a place to look for library files. Presuming that 
you're using a Unix-like system...

Option 1: Install GDAL, Freetype, GD, etc. into the standard places, eg. 
/usr and /usr/local
Don't forget to run "ldconfig" after installing libraries; it helps.

Option 1a: Add you installation directories to /etc/ld.so.conf and 
re-run "ldconfig"

Option 2: A htaccess file setting LD_LIBRARY_PATH
Create a .htaccess file or add to your webserver configuration this line:
# add your directory to the runtime linker's search path
SetEnv LD_LIBRARY_PATH "/home/yourusername/libs"

Option 3: a wrapper script
Rename mapserv to something else, e.g. mapserv.real
Write a simple shell script to set the linker path and then exec 
mapserv. I think it'd go something like this:
   #!/bin/sh
   export LD_LIBRARY_PATH="/home/me/testing/lib"
   exec /path/to/mapserv.real


I hope that helps. If not, please get back to us with specifics about 
your degree of sysadmin access on the server. For instance, can you 
install GDAL, et al into their usual places? Do you have permission to 
edit the ld.so.conf, or the webserver config?

-- 
Gregor Mosheh / Greg Allensworth
System Administrator, HostGIS cartographic development & hosting services
http://www.HostGIS.com/

"Remember that no one cares if you can back up,
  only if you can restore." - AMANDA



More information about the mapserver-users mailing list