[mapserver-dev] PHP Mapscript
Frank Broniewski
brfr at metrico.lu
Wed Oct 3 00:21:30 PDT 2012
Hi Thomas,
thanks for replying. I wonder if the problem occurs because there are 2
versions of GD in use, PHP uses its internal version and mapserver the
one from the system, and both mismatch in the minor version. FreeBSD GD
is gd-2.0.35_8,1, PHP uses [GD Version] => bundled (2.0.34 compatible)
Here's the backtrace:
(gdb) bt
#0 0x000000000069a10a in zend_std_get_constructor (object=0x802476258)
at /usr/ports/lang/php5/work/php-5.4.6/Zend/zend_object_handlers.c:1271
#1 0x00000000006a406f in ZEND_NEW_SPEC_HANDLER
(execute_data=0x8024410d8) at zend_vm_execute.h:816
#2 0x00000000006a0db1 in execute (op_array=0x8024770b0) at
zend_vm_execute.h:410
#3 0x00000000006627b9 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /usr/ports/lang/php5/work/php-5.4.6/Zend/zend.c:1289
#4 0x00000000005caa86 in php_execute_script (primary_file=0x7fffffffd7f0)
at /usr/ports/lang/php5/work/php-5.4.6/main/main.c:2473
#5 0x00000000007ba2c4 in do_cli (argc=3, argv=0x7fffffffdab0)
at /usr/ports/lang/php5/work/php-5.4.6/sapi/cli/php_cli.c:988
#6 0x00000000007bb2a9 in main (argc=3, argv=0x7fffffffdab0)
at /usr/ports/lang/php5/work/php-5.4.6/sapi/cli/php_cli.c:1364
and below (attention, long ;-)) the full core dump. The mapserver module
seems to get loaded without problem ...
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
Reading symbols from /usr/local/lib/libpcre.so.1...done.
Loaded symbols for /usr/local/lib/libpcre.so.1
Reading symbols from /lib/libm.so.5...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /usr/local/lib/libxml2.so.5...done.
Loaded symbols for /usr/local/lib/libxml2.so.5
Reading symbols from /lib/libz.so.6...done.
Loaded symbols for /lib/libz.so.6
Reading symbols from /usr/local/lib/libiconv.so.3...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /lib/libthr.so.3...done.
Loaded symbols for /lib/libthr.so.3
Reading symbols from
/usr/local/lib/php/20100525-debug/php_mapscript.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/php_mapscript.so
Reading symbols from /usr/local/lib/libcurl.so.6...done.
Loaded symbols for /usr/local/lib/libcurl.so.6
Reading symbols from /usr/lib/libssl.so.6...done.
Loaded symbols for /usr/lib/libssl.so.6
Reading symbols from /lib/libcrypto.so.6...done.
Loaded symbols for /lib/libcrypto.so.6
Reading symbols from /usr/local/lib/libpq.so.5...done.
Loaded symbols for /usr/local/lib/libpq.so.5
Reading symbols from /usr/local/lib/libgdal.so.17...done.
Loaded symbols for /usr/local/lib/libgdal.so.17
Reading symbols from /usr/local/lib/libgeos_c.so.8...done.
Loaded symbols for /usr/local/lib/libgeos_c.so.8
Reading symbols from /usr/local/lib/libproj.so.7...done.
Loaded symbols for /usr/local/lib/libproj.so.7
Reading symbols from /usr/local/lib/libexpat.so.6...done.
Loaded symbols for /usr/local/lib/libexpat.so.6
Reading symbols from /usr/local/lib/libgd.so.4...done.
Loaded symbols for /usr/local/lib/libgd.so.4
Reading symbols from /usr/local/lib/libjpeg.so.11...done.
Loaded symbols for /usr/local/lib/libjpeg.so.11
Reading symbols from /usr/local/lib/libfreetype.so.9...done.
Loaded symbols for /usr/local/lib/libfreetype.so.9
Reading symbols from /usr/lib/libbz2.so.4...done.
Loaded symbols for /usr/lib/libbz2.so.4
Reading symbols from /usr/local/lib/libpng15.so.15...done.
Loaded symbols for /usr/local/lib/libpng15.so.15
Reading symbols from /usr/local/lib/libXpm.so.4...done.
Loaded symbols for /usr/local/lib/libXpm.so.4
Reading symbols from /usr/local/lib/libX11.so.6...done.
Loaded symbols for /usr/local/lib/libX11.so.6
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /usr/local/lib/libintl.so.9...done.
Loaded symbols for /usr/local/lib/libintl.so.9
Reading symbols from /usr/local/lib/libgeos-3.3.3.so...done.
Loaded symbols for /usr/local/lib/libgeos-3.3.3.so
Reading symbols from /usr/local/lib/libsqlite3.so.8...done.
Loaded symbols for /usr/local/lib/libsqlite3.so.8
Reading symbols from /usr/local/lib/libxerces-c-3.1.so...done.
Loaded symbols for /usr/local/lib/libxerces-c-3.1.so
Reading symbols from /usr/local/lib/libNCSEcw.so.0...done.
Loaded symbols for /usr/local/lib/libNCSEcw.so.0
Reading symbols from /usr/local/lib/libNCSEcwC.so.0...done.
Loaded symbols for /usr/local/lib/libNCSEcwC.so.0
Reading symbols from /usr/local/lib/libNCSCnet.so.0...done.
Loaded symbols for /usr/local/lib/libNCSCnet.so.0
Reading symbols from /usr/local/lib/libNCSUtil.so.0...done.
Loaded symbols for /usr/local/lib/libNCSUtil.so.0
Reading symbols from /usr/local/lib/libjasper.so.4...done.
Loaded symbols for /usr/local/lib/libjasper.so.4
Reading symbols from /usr/local/lib/libgif.so.5...done.
Loaded symbols for /usr/local/lib/libgif.so.5
Reading symbols from /usr/local/lib/libSM.so.6...done.
Loaded symbols for /usr/local/lib/libSM.so.6
Reading symbols from /usr/local/lib/libICE.so.6...done.
Loaded symbols for /usr/local/lib/libICE.so.6
Reading symbols from /usr/local/lib/libxcb.so.2...done.
Loaded symbols for /usr/local/lib/libxcb.so.2
Reading symbols from /usr/local/lib/libXau.so.6...done.
Loaded symbols for /usr/local/lib/libXau.so.6
Reading symbols from /usr/local/lib/libXdmcp.so.6...done.
Loaded symbols for /usr/local/lib/libXdmcp.so.6
Reading symbols from /usr/local/lib/libpthread-stubs.so.0...done.
Loaded symbols for /usr/local/lib/libpthread-stubs.so.0
Reading symbols from /usr/lib/librpcsvc.so.5...done.
Loaded symbols for /usr/lib/librpcsvc.so.5
Reading symbols from /usr/local/lib/libgeotiff.so.3...done.
Loaded symbols for /usr/local/lib/libgeotiff.so.3
Reading symbols from /usr/local/lib/libtiff.so.4...done.
Loaded symbols for /usr/local/lib/libtiff.so.4
Reading symbols from /usr/local/lib/libjbig.so.1...done.
Loaded symbols for /usr/local/lib/libjbig.so.1
Reading symbols from /usr/lib/liblzma.so.5...done.
Loaded symbols for /usr/lib/liblzma.so.5
Reading symbols from /usr/lib/librt.so.1...done.
Loaded symbols for /usr/lib/librt.so.1
Reading symbols from /usr/local/lib/php/20100525-debug/hash.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/hash.so
Reading symbols from /usr/local/lib/php/20100525-debug/iconv.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/iconv.so
Reading symbols from /usr/local/lib/php/20100525-debug/pgsql.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/pgsql.so
Reading symbols from /usr/local/lib/php/20100525-debug/phar.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/phar.so
Reading symbols from /usr/local/lib/php/20100525-debug/zlib.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/zlib.so
Reading symbols from /usr/local/lib/php/20100525-debug/pdo.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/pdo.so
Reading symbols from /usr/local/lib/php/20100525-debug/mcrypt.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/mcrypt.so
Reading symbols from /usr/local/lib/libmcrypt.so.8...done.
Loaded symbols for /usr/local/lib/libmcrypt.so.8
Reading symbols from /usr/local/lib/libltdl.so.7...done.
Loaded symbols for /usr/local/lib/libltdl.so.7
Reading symbols from /usr/local/lib/php/20100525-debug/xml.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/xml.so
Reading symbols from /usr/local/lib/php/20100525-debug/dom.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/dom.so
Reading symbols from /usr/local/lib/php/20100525-debug/xmlreader.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/xmlreader.so
Reading symbols from /usr/local/lib/php/20100525-debug/xmlwriter.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/xmlwriter.so
Reading symbols from /usr/local/lib/php/20100525-debug/session.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/session.so
Reading symbols from /usr/local/lib/php/20100525-debug/bz2.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/bz2.so
Reading symbols from /usr/local/lib/php/20100525-debug/zip.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/zip.so
Reading symbols from /usr/local/lib/php/20100525-debug/mbstring.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/mbstring.so
Reading symbols from /usr/local/lib/libonig.so.1...done.
Loaded symbols for /usr/local/lib/libonig.so.1
Reading symbols from /usr/local/lib/php/20100525-debug/pdo_pgsql.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/pdo_pgsql.so
Reading symbols from /usr/local/lib/php/20100525-debug/pdo_sqlite.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/pdo_sqlite.so
Reading symbols from /usr/local/lib/php/20100525-debug/gettext.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/gettext.so
Reading symbols from /usr/local/lib/php/20100525-debug/json.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/json.so
Reading symbols from /usr/local/lib/php/20100525-debug/tokenizer.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/tokenizer.so
Reading symbols from /usr/local/lib/php/20100525-debug/curl.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/curl.so
Reading symbols from /usr/local/lib/php/20100525-debug/imap.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/imap.so
Reading symbols from /usr/local/lib/libc-client4.so.9...done.
Loaded symbols for /usr/local/lib/libc-client4.so.9
Reading symbols from /usr/lib/libpam.so.5...done.
Loaded symbols for /usr/lib/libpam.so.5
Reading symbols from /usr/local/lib/php/20100525-debug/filter.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/filter.so
Reading symbols from /usr/local/lib/php/20100525-debug/openssl.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/openssl.so
Reading symbols from /usr/local/lib/php/20100525-debug/posix.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/posix.so
Reading symbols from /usr/local/lib/php/20100525-debug/ctype.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/ctype.so
Reading symbols from /usr/local/lib/php/20100525-debug/simplexml.so...done.
Loaded symbols for /usr/local/lib/php/20100525-debug/simplexml.so
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=0x802476258)
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 101090/php)]
Many thanks,
Frank
Am 2012-10-03 09:04, schrieb thomas bonfort:
> Frank,
> please provide the full backtrace when the code segfaults ("bt" at
> the gdb prompt)
>
> --
> thomas
>
> On Wed, Oct 3, 2012 at 8:33 AM, Frank Broniewski <brfr at metrico.lu> wrote:
>> 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
>>
>> _______________________________________________
>> mapserver-dev mailing list
>> mapserver-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
--
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