PHP CLI bails with threaded libraries

Oliver Crow ocrow at
Wed Apr 16 22:48:04 UTC 2008

Xin LI wrote:
> Oliver Crow wrote:
>> I'm looking for advice on a problem with PHP on FreeBSD 7.0, which 
>> appears to be related to threading. Whenever I run the command line 
>> 'php' program I get a core dump with a series of error messages:
>>  > Fatal error 'Cannot allocate red zone for initial thread' at line 
>> 384 in file /usr/src/lib/libthr/thread/thr_init.c (errno = 12)
> You may have to rebuild all related stuff to get rid of this.  Linking 
> against different libc versions is not supported.

I did a portupgrade -f lang/php5, and that did the trick! I can now load 
php extensions such as mhash and pgsql which use libthr without dumping 

I guess this should have clued me in:
# ldd /usr/local/bin/php
...      => /lib/ (0x284a3000)
...      => /lib/ (0x285b4000)

After the portupgrade ldd shows only


More information about the freebsd-ports mailing list