From:             BenBE at omorphia dot de
Operating system: Debian Etch
PHP version:      5.2.5
PHP Bug Type:     Reproducible crash
Bug description:  Using LDAP causes script crash

Description:
------------
When updating PHP5 to the latest version (5.2.5-2 or newer), using the
LDAP extension produces a crash, causing the script to abort.

Version 5.2.4-2 was latest version, that didn't crash that way. Also tried
with 5.2.5-2, but same problem.

Reproduce code:
---------------
function get_ldap_name($unix)
{
        $ds = ldap_connect("ldap.example.com");
        $ldap_arr = get_ldap_info($unix, $ds);
        if ((is_array($ldap_arr)) && array_key_exists(0, $ldap_arr)) {
                $data = $ldap_arr[0]['cn'][0];
                ldap_close($ds);
                return $data;
        }
        ldap_close($ds);
        return false;
}


Expected result:
----------------
Script returns the full name of the user specified

Actual result:
--------------
tail -f /var/log/apache2/error.log

apache2: getattr.c:80: ldap_first_attribute: Assertion `len != 0' failed.
[Sun Feb 24 23:23:09 2008] [notice] child pid 1578 exit signal Aborted
(6)
apache2: getattr.c:80: ldap_first_attribute: Assertion `len != 0' failed.
[Sun Feb 24 23:23:14 2008] [notice] child pid 1580 exit signal Aborted
(6)


-- 
Edit bug report at http://bugs.php.net/?id=44238&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44238&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44238&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44238&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44238&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=44238&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44238&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44238&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44238&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44238&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44238&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=44238&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=44238&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44238&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44238&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=44238&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44238&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44238&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44238&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44238&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44238&r=mysqlcfg

Reply via email to