FreeBSD 6.1-R-p10 and PHP 5.2.0

Josh Paetzel josh at tcbug.org
Thu Nov 16 13:10:21 PST 2006


Freshly installed FreeBSD 6.1-R-p10 box

Fresh ports tree from today.  php 5.2.0 installed from ports with the 
following extensions:

php5-5.2.0          PHP Scripting Language (Apache Module and CLI)
php5-ctype-5.2.0    The ctype shared extension for php
php5-dom-5.2.0      The dom shared extension for php
php5-extensions-1.0 A "meta-port" to install PHP extensions
php5-iconv-5.2.0    The iconv shared extension for php
php5-imap-5.2.0     The imap shared extension for php
php5-mcrypt-5.2.0   The mcrypt shared extension for php
php5-mhash-5.2.0    The mhash shared extension for php
php5-mysqli-5.2.0   The mysqli shared extension for php
php5-pcre-5.2.0     The pcre shared extension for php
php5-posix-5.2.0    The posix shared extension for php
php5-pspell-5.2.0   The pspell shared extension for php
php5-session-5.2.0  The session shared extension for php
php5-simplexml-5.2.0 The simplexml shared extension for php
php5-sysvmsg-5.2.0  The sysvmsg shared extension for php
php5-sysvsem-5.2.0  The sysvsem shared extension for php
php5-sysvshm-5.2.0  The sysvshm shared extension for php
php5-tokenizer-5.2.0 The tokenizer shared extension for php
php5-zlib-5.2.0     The zlib shared extension for php

Following options used during the PHP install:

Build CLI
Build CGI
Bulld Apache module
Enable debug
Enable IPv6 support
Enable fastcgi support
Enable path-info-check support

# php -v
PHP 5.2.0 (cli) (built: Nov 16 2006 14:47:28) (DEBUG)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
Segmentation fault (core dumped)

backtrace from gdb:

-- #0  0x00000000 in ?? ()
#1  0x28a89ea8 in __do_global_dtors_aux ()
   from /usr/local/lib/php/20060613-debug/session.so
#2  0x28a90e40 in _fini () 
from /usr/local/lib/php/20060613-debug/session.so
#3  0x2827d018 in tls_dtv_generation () from /libexec/ld-elf.so.1
#4  0x2827e3d8 in ?? () from /libexec/ld-elf.so.1
#5  0xbfbfe9d8 in ?? ()
#6  0x2826508e in elf_hash () from /libexec/ld-elf.so.1
#7  0x28267970 in dlclose () from /libexec/ld-elf.so.1
#8  0x0817bb04 in module_destructor (module=0x830b380)
    at /usr/ports/lang/php5/work/php-5.2.0/Zend/zend_API.c:1915
#9  0x081801c2 in zend_hash_apply_deleter (ht=0x82797c0, p=0x83137c0)
    at /usr/ports/lang/php5/work/php-5.2.0/Zend/zend_hash.c:606
#10 0x0818031b in zend_hash_graceful_reverse_destroy (ht=0x82797c0)
    at /usr/ports/lang/php5/work/php-5.2.0/Zend/zend_hash.c:641
#11 0x0817596f in zend_shutdown ()
    at /usr/ports/lang/php5/work/php-5.2.0/Zend/zend.c:714
#12 0x0812fa15 in php_module_shutdown ()
    at /usr/ports/lang/php5/work/php-5.2.0/main/main.c:1650
#13 0x081db225 in main (argc=2, argv=0xbfbfec78)
    at /usr/ports/lang/php5/work/php-5.2.0/sapi/cli/php_cli.c:1273

Unloading the session module 'fixes' the problem.  Unfortunately 
session support is mission-critical.

As a further datapoint, php works fine from apache.

Need help determining where to go from here to resolve this issue.

Thanks,

Josh Paetzel


More information about the freebsd-ports mailing list