ID: 34892 User updated by: jason at mugfu dot com Reported By: jason at mugfu dot com -Status: Open +Status: Bogus Bug Type: LDAP related Operating System: FreeBSD 6.0 RC1 PHP Version: 5.0.5 New Comment:
Withdrawing bug. Now I can no longer reproduce this problem :/ Previous Comments: ------------------------------------------------------------------------ [2005-10-17 16:50:43] jason at mugfu dot com Description: ------------ Environment: - FreeBSD 6.0 RC-1 on AMD64 - OpenLDAP2.2 client libraries on php host - Connecting to OpenLDAP2.3 on remote host. When this script is run from the command line, the LDAP operations complete very quickly, without any problem. When executed via mod_php in Apache2, the php process will timeout everytime. I have enabled full debug tracing on in the LDAP server (OpenLDAP). It shows the result being sent back to the client, but the client does not close the connection. CPU usage on the httpd process handling the web client goes to 100%. ktrace/kdump show the process to be caught in a continuous loop like this: 69111 httpd CALL select(0x400,0x9e1d00,0x9e1d80,0,0) 69111 httpd RET select 1 Reproduce code: --------------- Short script: <?php error_reporting(E_ALL); $ds=ldap_connect("192.168.1.11"); echo "connect result is " . $ds . "<br />\n"; if (ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) { echo "Using LDAPv3<br/>\n"; } else { echo "Failed to set protocol version to 3<br/>\n"; } //Anonymous bind: $r=ldap_bind($ds); echo "Bind result is " . $r . "<br />\n"; $sr=ldap_search($ds, "dc=mydomain,dc=com", "(&(objectclass=*))"); echo "Number of entires returned is " . ldap_count_entries($ds, $sr) . "<br />\n"; ldap_close($ds); ?> Expected result: ---------------- I would expect the command line version, and the version running via mod_php to behave in the same fashion. Actual result: -------------- Process timeouts without any other error. Note that ldap_connect and ldap_set_option behave fine in both environments (I may be wrong, but I don't believe those actually open connections). It is ldap_bind and ldap_search that cause the issue. If I comment out ldap_bind, the process hangs on ldap_search. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34892&edit=1