When PHP is resolving any hostname (valid or not) PHP is segfaulting. It only happens when nss_ldap or nss_mysql is enabled in /etc/nsswitch.conf chris@hordeur: ~ $ cat /etc/nsswitch.conf group: files ldap group_compat: nis hosts: files dns networks: files passwd: files ldap passwd_compat: nis shells: files We reported this bug to PHP, but they say it'a a FreeBSD bug (see http://bugs.php.net/bug.php?id=36206) Backtraces are available in the PHP bug report. How-To-Repeat: Enable nss_ldap or nss_mysql and run something like echo "<?php mysql_connect('bla','bla','bla'); ?>"|php
Responsible Changed From-To: freebsd-i386->ale Make this a ports PR and assign.
Responsible Changed From-To: ale->nectar If it's a nss bug instead of php bug, perhaps nectar can solve it better than me.
Responsible Changed From-To: nectar->freebsd-ports-bugs Reset assignee; nectar is away from FreeBSD work at the moment.
Datapoint: still occurs with php 5.1.4 (FreeBSD5.4, nss_ldap-1.239, openldap-client-2.3.21). -- Thomas Sandford
Now nss_ldap-1.250 is available in ports tree, Please, try this version and report results. -- Andrey Slusar <anrays@gmail.com> <anray@FreeBSD.org>
I'm no longer able to reproduce the crash using the "How-To-Repeat" instructions in the bug report. My current setup is: FreeBSD5.4 (with SMP kernel) php 5.1.4, nss_ldap-1.250, openldap-client-2.3.21 [ie only likely significant change is upgrade from 1.239 to 1.250 in nss_ldap]. I'm continuing to have other random apache segfaults that only appear to happen on PHP pages though - whether this is related to this bug or not I don't know. Tracking of the crashes through use of a proxy indicates that the crashes are on legitimate page accesses, not malicious activity [but that they are not reproducible - ie the same page access as segfaulted on one attempt will sail through on another]. -- Thomas Sandford
State Changed From-To: open->closed problem is belived to to be fixed by updating nssd_ldap to 1.250
Using FreeBSD 6.1 with nss_ldap-1.251, php5-5.1.4 and openldap-*-2.3.24 The same probleme occurs: echo '<?php gethostbyname("toto") ?>' | php result in a Segmentation fault