From owner-freebsd-ports@FreeBSD.ORG Wed Mar 15 17:20:54 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2CFAB16A401 for ; Wed, 15 Mar 2006 17:20:54 +0000 (UTC) (envelope-from bpicinbono@worldonline.fr) Received: from smtp2-g19.free.fr (smtp2-g19.free.fr [212.27.42.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9EF8043D60 for ; Wed, 15 Mar 2006 17:20:51 +0000 (GMT) (envelope-from bpicinbono@worldonline.fr) Received: from [192.168.0.69] (min31-1-82-66-71-9.fbx.proxad.net [82.66.71.9]) by smtp2-g19.free.fr (Postfix) with ESMTP id 32A8673290 for ; Wed, 15 Mar 2006 18:20:50 +0100 (CET) From: blaise To: freebsd-ports@freebsd.org Date: Wed, 15 Mar 2006 18:22:22 +0100 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200603151822.22131.bpicinbono@worldonline.fr> Subject: Re: FreeBSD Port: mapserver-4.4.1 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2006 17:20:54 -0000 Hi I'm quite new on freebsd. I'm trying to setup a freebsd web server with php_mapscript running. 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 --with-php=/usr/local/include/php - 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 : http://lists.gis.umn.edu/pipermail/mapserver-users/2003-September/006800.html 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 methods. Hope it'll help Blaise > I'll give it a shot. Has anybody worked with Mathlab? > > Benjamin Thelen wrote: > Hi, > 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? > Ben > > Sam Lawrance schrieb: > [mapserver maintainer CC'ed] > > On 15/01/2006, at 11:34 PM, Mike Sacauskis wrote: > Hi > 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/ > --with-php=/usr/ports/lang/php4/work/php-4.4.1/ > --with-php-regex-dir=/usr/ports/lang/php4/work/php-4.4.1/regex > --with-freetype=/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 > -DPHP4 > 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 \ > -I/usr/local/include > > 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.