[Mapserver-users] PHP segfault with getlayerbyname

Christophe cp10 at chalonsursaone.com
Mon Aug 18 13:20:24 EDT 2003


Shame on me !!! I spent hours trying to find the error, playing with
mapfiles, and I had only forgotten to copy the fresh compiled version of
php_mapscript.so. I used a old one !

Sorry,

Christophe


On Mon, 18 Aug 2003, Christophe wrote:

>
> I have installed Mapserver on my Linux box, and I'm trying some
> PHP/mapscript programs.
>
> I can't use mapfiles with more than 1 layer. When I try to access a second
> one, I've a segfault in the PHP cgi (see below).
>
> I can only use the first declared layer in the mapfile. For exemple, with
> the gmap75 code from
> http://www2.dmsolutions.ca/webtools/php_mapscript/php_mapscript_dl.html
> I've a segfault at GMapGetStatus("road"), a function wrapped around
> getlayerbyname. The layer "road" is not the first layer in the mapfile.
> When I replace road with the first layer name (bathymetry), the
> programm continues until the next getlayerbyname call.
> I'have the same problem with simplest programs, and also when I replace
> the function getlayerbyname by getlayer(index).
>
> When there's only 1 layer in the mapfile, the map display fine.
>
> I have though at a problem with regex, my php cgi is compiled with:
> Regex Library 	System library enabled
> but also with PCRE ...
>
> Don't know what to do, I'm thinking about suicide !
>
> Sorry for my bad english.
>
> Christophe
>
> A small debug (don't know anything about C and library debugging...),
> I'have
> always the same error type, only the value of the parameter str changing.
>
>
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x0811a1b1 in add_property_string_ex (arg=0x0, key=0x406d282b "labelitem",
> key_len=10,
>     str=0xbff00000 "", duplicate=1) at
> /usr/src/mapserver/php-4.3.2/Zend/zend_API.c:978
> 978             ZVAL_STRING(tmp, str, duplicate);
>
> #0  0x0811a1b1 in add_property_string_ex (arg=0x0, key=0x406d282b
> "labelitem", key_len=10,
>     str=0xbff00000 "", duplicate=1) at
> /usr/src/mapserver/php-4.3.2/Zend/zend_API.c:978
> #1  0x4067ad46 in _phpms_build_layer_object () from
> /usr/local/lib/php/extensions/php_mapscript.so
> #2  0x406785a9 in php3_ms_map_getLayerByName () from
> /usr/local/lib/php/extensions/php_mapscript.so
>
>
>
>
>
>
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>




More information about the mapserver-users mailing list