My ongoing battle with GeoMOOSE 2.0.1 un Ubuntu 9.04

SOLVED! Skip to the bottom if you want the answers.

This past week I attended several presentations at the North Dakota GIS Users Conference in Grand Forks. The last workshop I was able to see was a general overview of setting up a web-based mapserver. There are several reasons for wanting to do this, but mostly it’s a way to share data with other people without having to move entire datasets to everyone who wants to view them.

I was most interested in the open-source web application GeoMOOSE, which allows users to set up web-based mapservers using pretty much whatever kinds of data layers are available (Google Maps, shapefiles, etc.). When I finally got around to trying this out for myself last night, I ran into problems right off the bat. Hopefully I can explain some of the things that went wrong for me and help someone out, especially if I can figure out just how to make this thing work (and I have a project in mind that would be perfect).

I tried to install first on my Powerbook G4, since I’ve been able to run various Linux/Unix programs on it before and web applications shouldn’t actually require an automated installer (I’m comfortable editing textual configuration files). I had no luck, potentially because I was trying to follow the online instructions for Unix and my Apache installation isn’t set up in quite the same way.

This morning I’m back into it on my Ubuntu Linux server (9.04 Jaunty Jackalope server) and trying to install everything exactly as it was explained. I installed MapServer (which I think is required and not just suggested for GeoMOOSE 2.0.1) via apt-get install:

sudo apt-get install cgi-mapserver mapserver-bin mapserver-doc php5-mapscript python-mapscript

It seems to work, because I can go to the MapServer URL (http://localhost/cgi-bin/mapserv) and get a message (“No query information to decode…”) that matches the one described on this page (step 8)/. Note that /cgi-bin/ is not in your web directory (in my case, /var/www/) but in /usr/lib/cgi-bin and then Apache aliased to be at the MapServer URL I have above. I have not tried to install the tutorial/demo, but that is next on my list of things to do.

Next, I “installed” GeoMOOSE according to the online instructions for Unix. A few notes:

  • Don’t unpackage the files to your web directory. They don’t need to go there because the configuration script will put files in other places that are actually the ones being used, and keeping those files in your web directory may be confusing. I know it was for me.
  • Files will be installed to /opt/geomoose2/ and you will be told to add a line to your Apache httpd.conf file (in Apache2 this is /etc/apache2/apache2.conf). This line references a GeoMOOSE file that sets Apache aliases (shortcuts) from your web directory to /opt/geomoose/htdocs. The line I had to use was
    Include /opt/geomoose2/geomoose2_httpd.conf

    even though the instructions are missing the “2” on the directory name. I only found this out because I tried to restart Apache and it threw an error.

  • What the geomoose2_httpd.conf file does is set up Apache aliases from your web directory to the actual GeoMOOSE files in /opt/geomoose2/htdocs. Remember, these aliases will not show up in your directory structure but they will work if you go to the URL with your browser, such as http://localhost/geomoose2/geomoose.html. I’ve no idea why the filename is geomoose2.html rather than index.html as it seems to have been in previous versions.

This, unfortunately, is where I stand. I can access what looks like the GeoMOOSE page via the URL above, but it doesn’t load maps or throw errors. I’m not sure it even sees MapServer, even though I checked the /opt/geomoose2/conf/settings.ini file to make sure the path was correct to MapServer.

I am still trying to figure out a solution and will be sure to post if I do.

UPDATE 11:26 AM.
The MapServer tutorial seems to work, as far as I’ve taken it. Even thought the site claims that all the URLs are designed for Linux/Unix, that is incorrect, so first I had to change the URLs I was using and THEN rearrange the data structure of the tutorial files (downloaded as a zip) in order to get everything displaying correctly. In any case, MapServer seems to know how to display things.

UPDATE 2:27 PM.
Success! First, I emailed the geomoose-users list for some help. The first reply reminded me that during the GIS presentation the Firefox addon Firebug had been mentioned. This addon allows you to see what data are going to and from your browser when you try to load a page.

I downloaded Firebug and immediately got to see (from the Console tab) that my “dynamically loaded extensions aren’t enabled…” After doing some looking online, I edited php.ini to set “enable_dl=On” where it had been “enable_dl=Off” before, then restarted Apache.

No maps yet, but another error: “unable to load dynamic library ‘/usr/lib/php5/20060613+lfs/php_dbase.so'” which was essentially saying that I was missing another library. Long story short, this is what I did, although I had to download the complete source from PHP.net rather than apt-getting it because the dbase directory was mysteriously missing. This included using apt-get to install beforehand the php5-dev package to run phpize. Note: even though my current PHP version is 5.2.6, I downloaded the source for 5.2.11 and everything seems to work okay (for one of the commentors here too).

Right around the time I finished up I got another helpful email–which showed that I was on the right track. I’m just glad I didn’t have to compile PHP from source!

You can see the active map (just the original demo at this point) at http://www.protichnoctem.com/geomoose2/geomoose.html.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.