I have limited access to the webserver.  The ISP gave me ssh access so I can login through putty, but I have no permission to change things outside of my home directory, or to run commands as root, which I believe is required for ldconfig.

Option 1. Not available. I contacted the ISP about adding libraries and they are not willing to do that.  So I have to install the libraries in my user directory.  I had thought that stating the path when compiling the libraries and mapserver was going to be enough, but apparently not.

Option 2. This seemed promising, but I can't get it to work.  I wasn't sure where the .htaccess file was supposed to go so I sprinkled copies around in a bunch of places. I noticed a (blank) .htaccess file in my public_html directory, so I tried putting the SetEnv command in there.
There is no change when I run ./mapserv -v from cgi-bin, or try to access http://www.alt2is.com/cgi-bin/mapserv? from my browser.
I also put a copy of the .htaccess file in cgi-bin, and a copy at the top level of my user directory (/home/alttwois), no difference.

Option 3. Tried this also.  No change, which I think means I managed to get the script to repeat what was going on in option 2, but libgdal is still not being found.

Don't Options 2 and 3 depend on there being a file libgdal.so.1 somewhere?  I cannot find any such file.
I used the following steps to install the gdal library:
          In CPanel
  1. Download gdal-1.4.2.tar.gz to local disk from http://www.gdal.org/
  2. Upload to website (into /home/alttwois/lib)
  3. Extract the tarball into /home/alttwois/lib
    In Putty
  4. cd lib/gdal*
  5. Run configuration command
    ./configure --prefix=$HOME/local --without-python
  6. make
  7. make install
Tara

Gregor Mosheh wrote:
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?



-- 
My e-mail delivery has been unreliable lately, so I am asking for
return receipts from all my email messages.
OK'ing the return receipt lets me know that my message was delivered.
Thank you.

Tara Athan
Principal, Alternatives to Invasive Species
[EMAIL PROTECTED]
707-485-1198
PO Box 415
Redwood Valley, CA 95470

Reply via email to