[maplab-users] MapLab under Mapserver 4.8.x with PHP 5.x?

Larry Shaffer larry at shafferinteractive.com
Sat Jan 28 15:55:08 EST 2006

Hi MapLab Peoples,

Is there any work on making MapLab compatible with Mapserver 4.8.x and
PHP 5.x? Also, are there any plans to upgrade MapLab with any Ajax
happiness for the forms?

I have recently built Mapserver 4.8rc3 and PHP 5.0.5 on my Linux server,
and I've noticed the following incompatibilities with MapLab:

1) I couldn't start MapLab without configuring the 'sessions' directory
in php.ini, which is commented-out. Not a big deal, just needs to be
part of an install doc.

2) While all of the green checkmarks are there when checking settings in
MapLab, MapEdit fails to access any layer info, and thus fails to
function properly. It will read that there is a layer, but not its name,
and it is not able to load the layer into the main pane of MapEdit.

On a side note... I notice that MapLab needs Freetype 1 support. I think
that Freetype 1 support has been dropped in PHP 5.x. From ./configure
results (note last line):

checking for FreeType 1.x support... /usr/local
checking for FreeType 2... /usr/local
checking for T1lib support... /usr/local
checking whether to enable truetype string function in GD... yes
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
checking for XpmFreeXpmImage in -lXpm... yes
checking for FreeType 1 support... no - FreeType 2.x is to be used instead

Maybe something to do with...


Also, with Freetype 1 and 2 installed in /usr/local PHP failed to
compile because an include directory order mix-up referenced the
Freetype 1 header files instead of 2.

I fixed this with:

	GDLIB_CFLAGS = -I/usr/local/include
	GDLIB_CFLAGS = -I/usr/local/include/freetype2 -I/usr/local/include
in Makefile, after 'configure' and before 'make'

(maybe separating the freetype install directories would also work
before ./configure)

Nonetheless I don't think Freetype 1 support is there anymore.

My ./configure line for Mapserver 4.8rc3:

./configure --enable-force-freetype1 --enable-runpath --with-curl-
config=/usr/local/bin/curl-config --with-freetype=/usr/local --with-gd=/
usr/local --with-gdal=/usr/local/bin/gdal-config --with-geos=/usr/local/
bin/geos-config --with-jpeg=/usr/local --with-libiconv=/usr/local/
my_iconv --with-ogr --with-pdf=/usr/local --with-php=/usr/local/php5.0.5
--with-png=/usr/local --with-postgis=/usr/local/pgsql/bin/pg_config --
with-proj=/usr/local --with-wfs --with-wcs --with-wfsclient --with-
wmsclient --with-xpm=/usr/X11R6 --with-zlib=/usr/local --without-httpd

My ./configure line for PHP 5.0.5:

./configure --prefix=/usr/local/php5.0.5 --enable-force-cgi-redirect --
with-mysql=/usr --enable-calendar --enable-trans-sid --with-zlib-dir=/
usr/local --with-curl=/usr/local --enable-dbase --enable-exif --with-gd=/
usr/local --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-
xpm-dir=/usr/X11R6 --with-freetype-dir=/usr/local --with-t1lib=/usr/
local --with-gettext=/usr/local --with-iconv=/usr/local/my_iconv --
enable-mbstring --with-mcrypt=/usr/local --with-mhash=/usr/local --with-
ncurses=/usr/local --with-pdflib=/usr/local --with-tiff-dir=/usr/local --
with-pgsql=/usr/local/pgsql --with-readline=/usr/local --with-pear --
with-regex=system --with-ttf=/usr/local --enable-gd-native-ttf --with-
libxml-dir=/usr/local --enable-soap --enable-sqlite-utf8 --with-libexpat-
dir=/usr/local --with-xsl=/usr/local --enable-ftp --with-bz2=/usr/local

I have a separate Mapserver 4.6.2 and PHP 4.4.1 cgi running an install
of MapLab, so it's not pressing to upgrade to PHP 5 for me. I just
thought I'd ask since I am developing a Web mapping app that needs to
run under PHP 5 (and installed by its users on their servers) and it
would be very handy for the users to utilize MapLab as well without
having to load up differing PHP/Mapserver configurations.

Thanks for all your hard work on MapLab.

Larry Shaffer
Black Hills of South Dakota 
USA (Mountain Time Zone)

More information about the Maplab-users mailing list