FreeBSD Port: mapserver-4.4.1
bpicinbono at worldonline.fr
Wed Mar 15 17:20:54 UTC 2006
I'm quite new on freebsd. I'm trying to setup a freebsd web server with
With freebsd 6.0, I installed with ports mapserver-4.4.1 (with apache13). It
gives a mapserver cgi that is working ok, but no php_mapscript.so extension.
I wanted to have the last mapserver version : 4.8.1 with php_mapscript, this
is how I build it :
1/---- set php as a cgi -----
- Install (with ports) /usr/ports/www/php4-cgi
- Copy /usr/local/bin/php to /usr/loca/www/cgi-bin directory
- append these two lignes at the end of httpd.conf
AddType application/x-httpd-php-cgi .php .php4 .phtml
Action application/x-httpd-php-cgi /cgi-bin/php
- restart apache and check in the phpinfo page that "Server API = CGI"
2/---- build mapserver (from sources)----
- ./configure --with-freetype --with-gd=/usr/local --enable-runpath
- gmake (and not make ... ;) )
- it creates the php_mapscript.so in mapscript/php3/
- copy this file to the php extensions directory (in my
case : /usr/local/lib/php/20020429 )
- update php.ini (in /usr/local/etc) to for the extension directory :
extension_dir = "/usr/local/lib/php/20020429/"
3/---- test ----
restart apache and try this phpinfo_mapserver.php page :
If the extension loads fine, you should have php_mapscript description listed
in the page. Then enjoy the gmap demo...
I had trouble with the "make" command to build mapserver. It worked to build a
basic mapserver (cgi), but failed building php_mapscript, confused about
locating php.h and more. In this mapserver-users list thread :
I found the trick about building with "gmake" instead of "make". I am not
familiar with that, if somebody could explain the differences between the two
Hope it'll help
> I'll give it a shot. Has anybody worked with Mathlab?
> Benjamin Thelen wrote:
> According to the user list, UMN-MapServer 4.8 is expected to be released
> this week. Maybe it is an idea to spend time and work to 4.8?
> Sam Lawrance schrieb:
> [mapserver maintainer CC'ed]
> On 15/01/2006, at 11:34 PM, Mike Sacauskis wrote:
> I was able to get mapserver-4.6.2 to build from source. I first
> built /usr/lang/php4 without installing it.
> I ran the ./configure --with-zlib=/usr/local/ --with-png=/usr/local/
> --with-jpeg=/usr/local/ --with-xpm=/usr/local/
> --with-libiconv=/usr/local/ --with-gd=/usr/local/
> I then had to hack the /mapserver-4.6.2/mapscript/php3/Makefile
> CFLAGS = -O2 -fPIC -Wall $(PHP_INC) -DUSE_PHP_REGEX -DCOMPILE_DL=1
> PHP_INC = -I$(PHP_SRC_DIR) -I$(PHP_SRC_DIR)/dl -I$(PHP_SRC_DIR)/main \
> -I$(PHP_SRC_DIR)Zend -I$(PHP_SRC_DIR)/include \
> -I$(PHP_SRC_DIR)/TSRM -I/usr/home/devel/mapserver-4.6.2 \
> That's great. Perhaps you could have a go at updating the port? Let me know
> > if you need some help.
> Check out the Porter's Handbook if it's you need more information.
More information about the freebsd-ports