Date: Wed, 15 Mar 2006 18:22:22 +0100 From: blaise <bpicinbono@worldonline.fr> To: freebsd-ports@freebsd.org Subject: Re: FreeBSD Port: mapserver-4.4.1 Message-ID: <200603151822.22131.bpicinbono@worldonline.fr>
next in thread | raw e-mail | index | archive | help
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 : <?php dl("php_mapscript.so"); phpinfo(); ?> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603151822.22131.bpicinbono>