ID: 29895 User updated by: sonny at sun dot com Reported By: sonny at sun dot com -Status: No Feedback +Status: Open Bug Type: LDAP related Operating System: Fedora Core 2 PHP Version: 4.3.8, 5.0.1 New Comment:
Sorry for the late repsonce. I was in vacation. I don't know how to handle gdb - so I try it to check it with other php verions. Try 5.0.3 which have the same result while I have changed the configure option for ldap from shared to static. Fails agian. But strange with 5.0.2 it works with cli as well sapi. The 4.3.x verions I haven't tried. But I'll get while make install strange errors from PEAR. Installing PEAR environment: /usr/local/php5/lib/php/ [PEAR] Archive_Tar: XML error: not well-formed (invalid token) at line 22 [PEAR] Console_Getopt - installed: 1.2 [PEAR] PEAR: XML error: not well-formed (invalid token) at line 22 [PEAR] XML_RPC: XML error: not well-formed (invalid token) at line 11 Maybe can you give me here a hint. -Peter Previous Comments: ------------------------------------------------------------------------ [2004-12-20 01:00:11] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2004-12-12 16:20:28] [EMAIL PROTECTED] Try to trace it in GDB instead of strace.. Put a break for zif_ldap_connect call and step from there and show the result. ------------------------------------------------------------------------ [2004-10-01 11:14:44] sonny at sun dot com Aditional info to strace: read(3, "<?php\n\n$ld = ldap_connect(\'129.1"..., 8192) = 88 read(3, "", 4096) = 0 read(3, "", 8192) = 0 close(3) = 0 munmap(0xf6d4d000, 4096) = 0 mmap2(NULL, 143360, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf6d2a000 fcntl64(147436232, F_SETFD, FD_CLOEXEC) = -1 EBADF (Bad file descriptor) fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf6d29000 write(1, "\n", 1 ) = 1 write(1, "Warning: ldap_close() expects pa"..., 99Warning: ldap_close() expects parameter 1 to be resource, boolean given in /tmp/ldap.php on line 6 ------------------------------------------------------------------------ [2004-10-01 11:10:35] sonny at sun dot com Yep I'm using standard openldap installation from Fedora. Just checked if cli tools from openldap works .. YES. Sample: ldapsearch -h example.com -b dc=example,dc=com -s sub -p 389 employeenumber=tester -x # search result search: 2 result: 0 Success # numResponses: 2 # numEntries: 1 I don't belive in a persission issue - while I have test the scripts as root. While webserver was shutdown the same behavior - as expected. I have try to strace the programm an found this srange/error: fstat64(4, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0 lseek(4, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek) dup(1) = 5 fstat64(5, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 lseek(5, 0, SEEK_CUR) = 0 dup(2) = 6 fstat64(6, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0 lseek(6, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek) Maybe this can help. ------------------------------------------------------------------------ [2004-10-01 10:01:58] [EMAIL PROTECTED] Do the openldap (assuming you're using openldap since you didn't say what you actually use) CLI tools work? This might be some weird permission issue. Maybe the user as what you run the script doesn't have rights to read the ldap ini files or something alike. And have you tried to run it on command line while you have Apache running? (this shouldn't matter..but try run it when you've shutdown Apache) ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/29895 -- Edit this bug report at http://bugs.php.net/?id=29895&edit=1