Mapserver/Mapscript 4.6 Compiling Problem

Paul Servant pservant at REFRACTIONS.NET
Fri Jun 17 15:08:15 EDT 2005


I did have the PHP GD library installed but kaMap wasn't loading the 
library.  kaMap loads init.php which dynamically loads the Mapscript 
extension for PHP.  However there seems to be a dependency between the 
Mapscript extension and GD.  If GD is loaded prior to Mapscript the 
problem goes away.  I didn't restart our Apache server after installing 
the php-gd packages through Fedora.  I assumed that kaMap was loading 
the GD extension for me.  It does load the extension in tile.php but 
init.php seems to be called first creating the error.  I'm currently 
loading my GD extension in my /etc/php.d/gd.ini file instead of relying 
on kaMap.

How do I report this to so the problem can be resolved for future 
releases of kaMap?

Cheers,
Paul

Bart van den Eijnden wrote:

>These functions are defined in the PHP GD2 extension. Do you have that extension? Is it loaded( or loaded by the kaMap script)?
>
>        if ( PHP_OS == "WINNT" || PHP_OS == "WIN32" )
>            $szGDModule = "php_gd2.dll";
>        else
>            $szGDModule = "php_gd2.so";
>
>        if (!extension_loaded("gd"))
>            dl($szGDModule);
>
>Best regards,
>Bart
>
>Bart van den Eijnden
>Syncera IT Solutions
>Postbus 270
>2600 AG  DELFT
>
>tel.nr.: 015-7512436
>email: BEN at Syncera-ITSolutions.nl
>
>  
>
>>>>Paul Servant <pservant at REFRACTIONS.NET> 06/16/05 08:48pm >>>
>>>>        
>>>>
>Hello,
>
>I've compiled mapserver 4.6 with no problems but I've noticed when mapscript
>compiles it throws the following warnings when I permform a make:
>
>php_mapscript.c: In function `php3_ms_img_pasteImage':
>php_mapscript.c:6267: warning: implicit declaration of function
>`php_gd_gdImageColorExact'
>php_mapscript.c:6271: warning: implicit declaration of function
>`php_gd_gdImageColorTransparent'
>php_mapscript.c:6274: warning: implicit declaration of function
>`php_gd_gdImageCopy'
>php_mapscript.c: In function `php3_ms_img_saveImage':
>php_mapscript.c:5997: warning: 'tmp' might be used uninitialized in this
>function
>
>Where are the functions php_gd_gdImageColorExact,
>php_gd_gdImageColorTransparent, and php_gd_gdImageCopy defined?
>
>It seems when I try running kamap and it tries to load the php_mapscript.so
>file it throws the following warning and error:
>
>PHP Warning:  dl(): Unable to load dynamic library
>'/usr/lib/php4/php_mapscript.so' - /usr/lib/php4/php_mapscript.so: undefined
>symbol: php_gd_gdImageCopy in /home/www/mapserv/htdocs/kamap/init.php on line 41
>PHP Fatal error:  Call to undefined function:  ms_newmapobj() in
>/home/www/mapserv/htdocs/kamap/init.php on line 44
>
>I compiled mapserver with the following configure statement:
>
>../configure --with-gdal=/usr/local/bin/gdal-config
>--with-ogr=/usr/local/bin/gdal-config
>--with-postgis=/opt/pgsql/8.0/bin/pg_config --with-proj --with-wfs
>--with-wfsclient --with-wmsclient --with-threads
>--with-curl-config=/usr/bin/curl-config --with-php=/usr/include/php
>--without-tiff
>
>Has anyone else seen this problem?  Is there anything wrong with my
>configure statement?  Is there a relation between the compiling problems and
>the php dynamic loading errors?
>
>Cheers,
>Paul
>
>  
>



More information about the mapserver-users mailing list