|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2006-01-30 11:55 UTC] tony2001@php.net
  [2006-01-30 12:00 UTC] oersoep at gmail dot com
  [2006-01-30 12:25 UTC] arnout at argeweb dot nl
  [2006-02-01 12:33 UTC] tony2001@php.net
  [2006-02-01 15:34 UTC] arnout at argeweb dot nl
  [2006-02-01 16:01 UTC] tony2001@php.net
  [2006-02-01 16:27 UTC] arnout at argeweb dot nl
  [2006-02-01 16:45 UTC] tony2001@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 17:00:02 2025 UTC | 
Description: ------------ Any hostname resolve in PHP causes a segmentation fault. It only happens when this file contains the ldap keyword. When removed, everything works fine. Everything works great when using modphp. It only happens when using the executable. root@host: / # cat /etc/nsswitch.conf group: files ldap group_compat: nis hosts: files dns networks: files passwd: files passwd_compat: nis shells: files We've seen it on two seperate systems. It's on PHP versions 5.0.5, 5.1.1 and 5.1.2 Server #1: openldap 2.2.30 nss_ldap 1.244 php 5.0.5 FreeBSD 5.4-RELEASE-p8 Server #2: nss_ldap-1.239 openldap-client-2.2.27 php 5.1.2 FreeBSD 5.4-RELEASE-p8 Reproduce code: --------------- root@host: / # echo "<? echo gethostbyname('php.net'); ?>" | php root@host: / # echo "<? mysql_connect( 'badgerbadger', '', '' ); ?>" | php #!/usr/local/bin/php <?php // this echo gethostbyname( 'php.net' ); // AND this too mysql_connect( 'blahdieblah', '', '' ); // and anything that resolves. ?> Expected result: ---------------- An IP-address and an error because the mysql host doesn't exist. Actual result: -------------- Segmentation fault on any line that resolves a hostname.