[mapserver-dev] PHP Mapscript

Frank Broniewski brfr at metrico.lu
Tue Oct 2 23:33:01 PDT 2012


Hi,

I am having problems using mapscript on FreeBSD. I tried alreay the 
users mailing list, but without success. Maybe some developers can help 
me with my problem.

I am forwarding this from the FreeBSD mailing list. Maybe someone here
has a clue. I have a problem with PHP Mapscript (the graphics/mapserver
package). I suppose the problem is in conjunction with the combination
of lang/php5 (PHP 5.4.6) and Mapserver 6.0.3. Everytime I try to
initiate a new mapObj in mapscript, PHP segfaults.

My testscript:
<?php
echo ms_GetVersion();
$map = new mapObj('test.map');
?>

ms_GetVersion() still works, but the next line ($map = new
mapObj('test.map')) causes the segmentation fault to happen:
brfr at frodo# php -f pi.php
MapServer version 6.0.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL
INPUT=SHAPEFILESegmentation fault (core dumped)

An examination of the core with gdb yields
brfr at frodo# gdb /usr/local/bin/php php.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
Core was generated by `php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libcrypt.so.5...done.
Loaded symbols for /lib/libcrypt.so.5
[snip ...]
Reading symbols from /usr/local/lib/php/20100525-debug/tidy.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/tidy.so
Reading symbols from /usr/local/lib/libtidy-0.99.so.0...done.
Loaded symbols for /usr/local/lib/libtidy-0.99.so.0
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x000000000069a10a in zend_std_get_constructor (object=0x8024762c8)
      at 
/usr/ports/lang/php5/work/php-5.4.6/Zend/zend_object_handlers.c:1271
1271	/usr/ports/lang/php5/work/php-5.4.6/Zend/zend_object_handlers.c: No
such file or directory.
	in /usr/ports/lang/php5/work/php-5.4.6/Zend/zend_object_handlers.c
[New Thread 802407400 (LWP 100919/php)]
(gdb)


I tried compiling everything back and forth, enabled and disabled all
kinds of PHP extensions but nothing helps. Segfault is coming always
back to me. Btw.
root at frodo# php -v
PHP 5.4.6 (cli) (built: Sep 26 2012 15:32:23) (DEBUG)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

works, and all non-mapscript PHP applications seem to run fine.

So, finally, any tipps to solve this problem are greatly appreceated ...

Frank
-- 
Frank BRONIEWSKI

METRICO s.à r.l.
géomètres
technologies d'information géographique
rue des Romains 36
L-5433 NIEDERDONVEN

tél.: +352 26 74 94 - 28
fax.: +352 26 74 94 99
http://www.metrico.lu



More information about the mapserver-dev mailing list