php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17915 cannot compile php with openldap support
Submitted: 2002-06-21 18:12 UTC Modified: 2002-06-21 18:23 UTC
From: smilic at EUnet dot yu Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.2.1 OS: Solaris 2.8
Private report: No CVE-ID: None
 [2002-06-21 18:12 UTC] smilic at EUnet dot yu
PHP 4.2.1 cannot be compiled with openldap support.
Compilation fails on ext/ldap/ldap.c, producing
error in line 2030:

    ldap.c:2030: `tsrm_ls' undeclared (first use in
    this function)

Line 2030 uses TSRMLS_CC, which is defined in TSRM/TSRM.h
to be

     #define TSRMLS_C        tsrm_ls
     #define TSRMLS_CC       , TSRMLS_C

But, tsrm_ls has never been defined ! Although TSRMLS_CC
has been used in other places in ldap.c, only in line
2030 it creates problem. It looks that source of the
problem is that function is defined as:

    int _ldap_rebind_proc ...

so it is not PHP function, and tsrm_ls is not implicitly
defined. Adding following line in ldap.c, just before
line 2030:

    void ***tsrm_ls; /* Added by smilic@EUnet.yu */

fixes the problem.

Regards,
  Sasa Milic

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-21 18:23 UTC] mfischer@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.

The proper fix is to call TSRMLS_FETCH(); right after the variable decelartions in _ldap_rebind_proc
 [2002-09-23 14:22 UTC] Paul dot Brzezinski at EDS dot COM
This is still a problem on the latest STABLE snapshot from php4-STABLE-200209230900.  Adding the TSRMLS_FETCH(); just before line 2030 in ldap.c does indeed resolve the problem on Solaris 2.8 (SPARC) w/gcc-3.1 in 64-bit mode.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 20:01:32 2024 UTC