With postgres/postgis/php_mapscript. this is assuming installation after a clean install of FreeBSD 6.2, with ports, but no x window system.
The other version numbers are :
SERVER_SOFTWARE : Apache/2.2.4 (FreeBSD) mod_ssl/2.2.4 OpenSSL/0.9.7e-p1 DAV/2 PHP/5.2.1 with Suhosin-Patch
It will really help if you have a copy of the FreeBSD Handbook on the screen of another computer, so you can look for FreeBSD help, and obviously access to the MapServer Website.
:w :q is how to write and quit vi, don't forget to press 'esc' before these commands
cvsup ports-supfile(to make sure you are getting the most recent ones)
setenv LDFLAGS -lstdc++(this is important for PostgreSQL, and has to be done before compiling, so do it now. You can check it is set by just typing
setenv, and making sure it is there.)
cd /usr/ports/graphics/jpeg make install cleanDo this for each of :
jpeg png tiff gd proj geosthen for :
ftp/ curl textproc/ libxml2 print/ freetype pdflib devel/ doxygen lang/ perl php5-extensions www/ apache22 databases/ postgresql82-server postgis
tar -xzf mapserver-4.10.1.tar.gz /usr/local/mapserver-4.10.1 cd /usr/local/mapserver-4.10.1
vi config
and put this in, pretty much as it appears below
./configure --with-freetype=/usr/local/bin \ --with-png=/usr/local/lib \ --with-jpeg=/usr/local \ --with-libiconv=/usr/local \ --with-geos=/usr/local/bin/geos-config \ --with-ogr=/usr/local/bin/gdal-config \ --with-gdal=/usr/local/bin/gdal-config \ --with-httpd=/usr/local/sbin/httpd \ --with-wfsclient \ --with-wmsclient \ --enable-runpath \ --enable-debug \ --with-curl-config=/usr/local/bin/curl-config \ --with-proj=/usr/local \ --with-pdf=/usr/local \ --with-tiff=/usr/local \ --with-threads \ --with-wcs \ --with-postgis=/usr/local/bin/pg_config \ --with-php=/usr/local \ --with-xml2-config=/usr/bin/xml2-config # new in 4.10 :w :q
chmod 744 config ./config
vi mapscript/php3/Makefile
CFLAGS112 = $(CFLAGS) $(MS_DEFINE) $(MS_INC) $(PHP_INC) $(PHP_REGEX_INC)
to :
CFLAGS112 = $(MS_DEFINE) $(MS_INC) $(PHP_INC) $(PHP_REGEX_INC)
CFLAGS = $(CFLAGS1) $(CFLAGS112)
compiler %.o: %.c php_mapscript_util.h php_mapscript.h
$(CC) $(CFLAGS112) -c -o $@ $<
change :
$(CFLAGS112)
to:
$(CFLAGS) :w :q
make(Note that this is not make install clean!)
cp mapserv /usr/local/www/apache22/cgi-bin/
mapserv -vin the directory you have just moved it to.
cp mapscript/php3/php_mapscript.so /usr/local/lib/php/20060613/ vi /usr/local/etc/php/extensions.ini
extension=php_mapscript.so :w :q
apachectl graceful
ln -s /usr/local/www/apache22/data/ htdocs
vi /htdocs/server.php :w :q
10.0.1.3/server.php
Which tells you that the webserver and php are both working.
10.0.1.3/cgi-bin/mapserv
which should return you the lovely line : No query information to decode. QUERY_STRING is set, but empty.