Seg faults using PEAR DB with php mapscript
Rob P.
rob at DATAFLOWDESIGN.COM
Fri Jan 14 11:25:09 PST 2005
Am getting a segmentation violation error when my php mapscript
application exits. Otherwise, the application runs without errors and
produces the correct results. I am using mapscript with Pear DB to
connect to a postgresql database on a FreeBSD system.
Here is a simple application that loads the mapscript library and then
connects to pgsql. If I remove the dl(php_mapscript) command, there is
no error.
I would like to make sure that it is not my configuration. I would be
grateful if someone would run this code in their unix or linux
environment:
<?php
## No error when next line is disabled
dl('php_mapscript.so');
require_once 'DB.php';
$db = @DB::connect("pgsql://nobody:nobody@localhost/geotest");
error_log("after connect");
if (DB::isError($db))
die('checkConnection(): connection error');
$db->disconnect();
error_log("disconnected");
?>
Messages in log file:
Jan 14 12:54:42 ursus php: after connect
Jan 14 12:54:42 ursus php: disconnected
Jan 14 12:54:42 ursus /kernel: pid 12663 (php), uid 80: exited on signal 11
I have this problems with several versions of mapserver, php, PGSql,
and FreeBSD.
The particulars:
PHP configured as cgi under Apache.
MapServer version 4.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_CLIENT INPUT=EPPL7 INPUT=POSTGIS
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
Have also experienced this with 4.0.2
OS is FreeBSD 4.9
PHP Version 4.3.10
'./configure' '--prefix=/home/rob/local' '--enable-cgi'
'--enable-force-cgi-redirect' '--enable-fastcgi' '--with-inifile'
'--with-pgsql=shared' '--with-gd' '--with-zlib-dir'
'--with-freetype-dir' '--with-regex=system'
psql (PostgreSQL) 7.4.1
Thanks for your help,
Rob
More information about the MapServer-users
mailing list