ID: 22686 Updated by: [EMAIL PROTECTED] Reported By: pyrox_pro at hotmail dot com -Status: Open +Status: Feedback Bug Type: LDAP related Operating System: RedHat 7.3 PHP Version: 4.3.1 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Previous Comments: ------------------------------------------------------------------------ [2003-03-13 16:20:06] pyrox_pro at hotmail dot com For a description that looks pretty, go here: http://www.phpbuilder.com/board/showthread.php?s=&threadid=10232112 This code worked awhile back. Seems like it was working a few versions back. Now it just dies, no errors to screen, no errors in apache logs, not one thing anywhere. The output just stops at the function: $info=ldap_get_entries($ds, $sr); For no apparent reason. At first I thought it was outdated libs, so I updated everything, openldap, openssl, php to 4.3.1 , ect. Still nothing. It just dies with no output or explanation. PHP:-------------------------------------------------------------------------------- $ds=ldap_connect("ldaps://".$ldap['SERV']."/"); $r=ldap_bind($ds,$ldap['user'],$ldap['pass']); if(ldap_errno($ds)) die("<FONT COLOR=#ff0000>".ldap_error($ds)); $sr=ldap_search($ds,"OU=".stripslashes($agent).", ".$ldap['dn']."","CN=*"); if(ldap_errno($ds)) die("<FONT COLOR=#ff0000>".ldap_error($ds)); echo "Number of entires returned is ".ldap_count_entries($ds,$sr)."<p>"; echo "Getting entries ...<p>"; flush(); $info=ldap_get_entries($ds, $sr); echo "Data for ".$info["count"]." items returned:<p>"; flush(); for ($i=0; $i<$info["count"]; $i++) { echo "dn is: ". $info[$i]["dn"] ."<br>"; echo "first cn entry is: ". $info[$i]["cn"][0] ."<br>"; echo "first email entry is: ". $info[$i]["mail"][0] ."<p>"; } echo "Closing connection"; flush(); -------------------------------------------------------------------------------- The output when run looks like this: Number of entires returned is 580 Getting entries ... And thats it, just sudden death. I view the page source just to be sure. And like I said, there is squat in the logs about any errors. Much of this code is pulled directly from the manual or tutorials. It used to work, some event caused it to fail. ( I went from php 4.2.2 to php 4.3 ) I have searched google, the php.net bug lists, ect. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22686&edit=1
