Debian and mapserver, another take

Vinko Vrsalovic el at VINKO.CL
Thu Mar 24 12:03:06 EST 2005


Hi, I've been trying for two days to install mapscript on a debian box
(yes, I have read the recent thread about the issue, but it doesn't
apply to my case, it appears) and haven't been successful.

I have php CGI compiled from source, apache is from the debian package.
Mapserver 4.4.1 compiled against the source tree of php, both php-cgi
and php_mapscript.so are compiled against the same libraries (where
pertinent)

The problem is, when I run from the commandline:

#php-cgi draw.php

it works fine, generating the image without a single problem.

When I run it through apache, the same script hangs...
(I have the Action and AddHandler directives in order to execute as a
CGI, tested with phpinfo())

gdb'ing the php instance i see it hangs after calling
_phpms_report_mapserver_error. It hangs with 99% CPU usage and stays
there until the interpreter kills it for running longer than 30 seconds,
instead of throwing the relevant error to the screen and finishing, is
this maybe a threading issue? Where is my mistake?

PHP configure:  './configure' '--with-gd=/usr/local' '--with-pgsql'
'--with-freetype-dir=/usr/local' '--with-regex=system'

MapScript configure:

./configure --with-php=/usr/local --with-gdal=/usr/local/bin/gdal-config
--without-tiff --without-jpeg --without-png --with-freetype=/usr/local
--with-gd --with-postgis=/usr/local/pgsql/bin/pg_config
--with-proj=/usr/local --with-threads
--with-php-regex-dir=../php-4.3.10/regex --enable-debug

Backtrace:

#0  0x40232623 in mallopt () from /lib/tls/libc.so.6
#1  0x402318c3 in malloc () from /lib/tls/libc.so.6
#2  0x0813197e in _emalloc (size=1076827752) at
/home/admin/mupworks-deps-srcs/php-4.3.10/Zend/zend_alloc.c:164
#3  0x08119165 in xbuf_resize (xbuf=0xbfffd290, add=128) at
/home/admin/mupworks-deps-srcs/php-4.3.10/main/spprintf.c:143
#4  0x081191cd in xbuf_init (xbuf=0xbfffd290, max_len=8192) at
/home/admin/mupworks-deps-srcs/php-4.3.10/main/spprintf.c:160
#5  0x08119bc1 in vspprintf (pbuf=0xbfffd2f8, max_len=8192,
format=0x2000 <Address 0x2000 out of bounds>,
    ap=0x2000 <Address 0x2000 out of bounds>) at
/home/admin/mupworks-deps-srcs/php-4.3.10/main/spprintf.c:630
#6  0x081157f1 in php_error_cb (type=2, error_filename=0x81d29a4
"/var/www/sinresiduos/draw.php", error_lineno=2,
    format=0x2000 <Address 0x2000 out of bounds>, args=0x2000 <Address
0x2000 out of bounds>)
    at /home/admin/mupworks-deps-srcs/php-4.3.10/main/main.c:599
#7  0x0813f3e6 in zend_error (type=2, format=0x404ed540 "[MapServer
Error]: %s: %s\n")
    at /home/admin/mupworks-deps-srcs/php-4.3.10/Zend/zend.c:763
#8  0x4043c8f7 in _phpms_report_mapserver_error (php_err_type=2) at
php_mapscript_util.c:129
#9  0x40440413 in php3_ms_map_new (ht=1, return_value=0x81e2efc,
this_ptr=0x0, return_value_used=1) at php_mapscript.c:1730
#10 0x0814dad7 in execute (op_array=0x81d2aac) at
/home/admin/mupworks-deps-srcs/php-4.3.10/Zend/zend_execute.c:1642
#11 0x0813f549 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
    at /home/admin/mupworks-deps-srcs/php-4.3.10/Zend/zend.c:900
#12 0x0811798d in php_execute_script (primary_file=0xbffff990) at
/home/admin/mupworks-deps-srcs/php-4.3.10/main/main.c:1736
#13 0x0815276f in main (argc=1, argv=0xbffffa54) at
/home/admin/mupworks-deps-srcs/php-4.3.10/sapi/cgi/cgi_main.c:1592


--
Vinko Vrsalovic <el[|- at -|]vinko.cl>



More information about the mapserver-users mailing list