Repository navigation
Closed
Description
Description
The following code:
./buildconf
./configure --with-ldap=/path/to/oracle-instantclient/instantclient_19_23/
gmakeResulted in this output:
In file included from ./php-src/main/php.h:429,
from ./php-src/ext/ldap/ldap.c:29:
./php-src/ext/ldap/ldap_arginfo.h: In function ‘register_ldap_symbols’:
./php-src/ext/ldap/ldap_arginfo.h:773:57: error: ‘LDAP_EXOP_START_TLS’ undeclared (first use in this function)
773 | REGISTER_STRING_CONSTANT("LDAP_EXOP_START_TLS", LDAP_EXOP_START_TLS, CONST_PERSISTENT);
| ^~~~~~~~~~~~~~~~~~~
./php-src/Zend/zend_constants.h:53:108: note: in definition of macro ‘REGISTER_STRING_CONSTANT’
53 | #define REGISTER_STRING_CONSTANT(name, str, flags) zend_register_string_constant((name), sizeof(name)-1, (str), (flags), module_number)
| ^~~
./php-src/ext/ldap/ldap_arginfo.h:773:57: note: each undeclared identifier is reported only once for each function it appears in
773 | REGISTER_STRING_CONSTANT("LDAP_EXOP_START_TLS", LDAP_EXOP_START_TLS, CONST_PERSISTENT);
| ^~~~~~~~~~~~~~~~~~~
./php-src/Zend/zend_constants.h:53:108: note: in definition of macro ‘REGISTER_STRING_CONSTANT’
53 | #define REGISTER_STRING_CONSTANT(name, str, flags) zend_register_string_constant((name), sizeof(name)-1, (str), (flags), module_number)
| ^~~
./php-src/ext/ldap/ldap_arginfo.h:776:61: error: ‘LDAP_EXOP_MODIFY_PASSWD’ undeclared (first use in this function)
776 | REGISTER_STRING_CONSTANT("LDAP_EXOP_MODIFY_PASSWD", LDAP_EXOP_MODIFY_PASSWD, CONST_PERSISTENT);
| ^~~~~~~~~~~~~~~~~~~~~~~
./php-src/Zend/zend_constants.h:53:108: note: in definition of macro ‘REGISTER_STRING_CONSTANT’
53 | #define REGISTER_STRING_CONSTANT(name, str, flags) zend_register_string_constant((name), sizeof(name)-1, (str), (flags), module_number)
| ^~~
./php-src/ext/ldap/ldap_arginfo.h:779:55: error: ‘LDAP_EXOP_REFRESH’ undeclared (first use in this function)
779 | REGISTER_STRING_CONSTANT("LDAP_EXOP_REFRESH", LDAP_EXOP_REFRESH, CONST_PERSISTENT);
| ^~~~~~~~~~~~~~~~~
./php-src/Zend/zend_constants.h:53:108: note: in definition of macro ‘REGISTER_STRING_CONSTANT’
53 | #define REGISTER_STRING_CONSTANT(name, str, flags) zend_register_string_constant((name), sizeof(name)-1, (str), (flags), module_number)
| ^~~
./php-src/ext/ldap/ldap_arginfo.h:782:56: error: ‘LDAP_EXOP_WHO_AM_I’ undeclared (first use in this function)
782 | REGISTER_STRING_CONSTANT("LDAP_EXOP_WHO_AM_I", LDAP_EXOP_WHO_AM_I, CONST_PERSISTENT);
| ^~~~~~~~~~~~~~~~~~
./php-src/Zend/zend_constants.h:53:108: note: in definition of macro ‘REGISTER_STRING_CONSTANT’
53 | #define REGISTER_STRING_CONSTANT(name, str, flags) zend_register_string_constant((name), sizeof(name)-1, (str), (flags), module_number)
| ^~~
./php-src/ext/ldap/ldap_arginfo.h:785:52: error: ‘LDAP_EXOP_TURN’ undeclared (first use in this function); did you mean ‘LDAP_OPT_ON’?
785 | REGISTER_STRING_CONSTANT("LDAP_EXOP_TURN", LDAP_EXOP_TURN, CONST_PERSISTENT);
| ^~~~~~~~~~~~~~
./php-src/Zend/zend_constants.h:53:108: note: in definition of macro ‘REGISTER_STRING_CONSTANT’
53 | #define REGISTER_STRING_CONSTANT(name, str, flags) zend_register_string_constant((name), sizeof(name)-1, (str), (flags), module_number)
| ^~~
./php-src/ext/ldap/ldap.c: In function ‘ldap_link_free’:
./php-src/ext/ldap/ldap.c:130:9: warning: implicit declaration of function ‘ldap_destroy’; did you mean ‘mrp_destroy’? [-Wimplicit-function-declaration]
130 | ldap_destroy(ld->link);
| ^~~~~~~~~~~~
| mrp_destroy
./php-src/ext/ldap/ldap.c: In function ‘_php_ldap_control_to_array’:
./php-src/ext/ldap/ldap.c:249:37: error: ‘LDAP_CONTROL_PASSWORDPOLICYRESPONSE’ undeclared (first use in this function)
249 | if (strcmp(ctrl->ldctl_oid, LDAP_CONTROL_PASSWORDPOLICYRESPONSE) == 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./php-src/ext/ldap/ldap.c:251:17: error: unknown type name ‘LDAPPasswordPolicyError’
251 | LDAPPasswordPolicyError pperr;
| ^~~~~~~~~~~~~~~~~~~~~~~
./php-src/ext/ldap/ldap.c:254:22: warning: implicit declaration of function ‘ldap_parse_passwordpolicy_control’ [-Wimplicit-function-declaration]
254 | rc = ldap_parse_passwordpolicy_control(ld, ctrl, &expire, &grace, &pperr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./php-src/ext/ldap/ldap.c:260:39: error: ‘PP_noError’ undeclared (first use in this function)
260 | if ( pperr != PP_noError ) {
| ^~~~~~~~~~
./php-src/ext/ldap/ldap.c:267:44: error: ‘LDAP_CONTROL_PAGEDRESULTS’ undeclared (first use in this function); did you mean ‘LDAP_CONTROL_MANAGEDSAIT’?
267 | } else if (strcmp(ctrl->ldctl_oid, LDAP_CONTROL_PAGEDRESULTS) == 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| LDAP_CONTROL_MANAGEDSAIT
./php-src/ext/ldap/ldap.c:274:30: warning: implicit declaration of function ‘ldap_parse_pageresponse_control’ [-Wimplicit-function-declaration]
274 | rc = ldap_parse_pageresponse_control(ld, ctrl, &lestimated, &lcookie);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./php-src/ext/ldap/ldap.c:292:45: error: ‘LDAP_CONTROL_PRE_READ’ undeclared (first use in this function); did you mean ‘LDAP_CONTROL_PWDEXPIRED’?
292 | } else if ((strcmp(ctrl->ldctl_oid, LDAP_CONTROL_PRE_READ) == 0) || (strcmp(ctrl->ldctl_oid, LDAP_CONTROL_POST_READ) == 0)) {
| ^~~~~~~~~~~~~~~~~~~~~
| LDAP_CONTROL_PWDEXPIRED
./php-src/ext/ldap/ldap.c:292:102: error: ‘LDAP_CONTROL_POST_READ’ undeclared (first use in this function); did you mean ‘LDAP_CONTROL_NOT_FOUND’?
292 | } else if ((strcmp(ctrl->ldctl_oid, LDAP_CONTROL_PRE_READ) == 0) || (strcmp(ctrl->ldctl_oid, LDAP_CONTROL_POST_READ) == 0)) {
| ^~~~~~~~~~~~~~~~~~~~~~
| LDAP_CONTROL_NOT_FOUND
./php-src/ext/ldap/ldap.c:309:33: error: unknown type name ‘BerVarray’
309 | BerVarray vals = NULL;
| ^~~~~~~~~
./php-src/ext/ldap/ldap.c:309:50: warning: initialization of ‘int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
309 | BerVarray vals = NULL;
| ^~~~
./php-src/ext/ldap/ldap.c:312:88: warning: comparison between pointer and integer
312 | if (ber_scanf(ber, "[W]", &vals) == LBER_ERROR || vals == NULL)
| ^~
./php-src/ext/ldap/ldap.c:318:49: error: subscripted value is neither array nor pointer nor vector
318 | for (i = 0; vals[i].bv_val != NULL; i++) {
| ^
./php-src/ext/ldap/ldap.c:319:74: error: subscripted value is neither array nor pointer nor vector
319 | add_next_index_stringl(&tmp, vals[i].bv_val, vals[i].bv_len);
| ^
./php-src/ext/ldap/ldap.c:319:90: error: subscripted value is neither array nor pointer nor vector
319 | add_next_index_stringl(&tmp, vals[i].bv_val, vals[i].bv_len);
| ^
./php-src/ext/ldap/ldap.c:323:33: warning: implicit declaration of function ‘ber_bvarray_free’ [-Wimplicit-function-declaration]
323 | ber_bvarray_free(vals);
| ^~~~~~~~~~~~~~~~
./php-src/ext/ldap/ldap.c:331:44: error: ‘LDAP_CONTROL_SORTRESPONSE’ undeclared (first use in this function); did you mean ‘LDAP_CONTROL_NOT_FOUND’?
331 | } else if (strcmp(ctrl->ldctl_oid, LDAP_CONTROL_SORTRESPONSE) == 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| LDAP_CONTROL_NOT_FOUND
./php-src/ext/ldap/ldap.c:337:30: warning: implicit declaration of function ‘ldap_parse_sortresponse_control’ [-Wimplicit-function-declaration]
337 | rc = ldap_parse_sortresponse_control(ld, ctrl, &errcode, &attribute);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./php-src/ext/ldap/ldap.c:352:44: error: ‘LDAP_CONTROL_VLVRESPONSE’ undeclared (first use in this function)
352 | } else if (strcmp(ctrl->ldctl_oid, LDAP_CONTROL_VLVRESPONSE) == 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
./php-src/ext/ldap/ldap.c:358:30: warning: implicit declaration of function ‘ldap_parse_vlvresponse_control’ [-Wimplicit-function-declaration]
358 | rc = ldap_parse_vlvresponse_control(ld, ctrl, &target, &count, &context, &errcode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./php-src/ext/ldap/ldap.c:371:25: warning: implicit declaration of function ‘ber_bvfree’; did you mean ‘ber_free’? [-Wimplicit-function-declaration]
371 | ber_bvfree(context);
| ^~~~~~~~~~
| ber_free
./php-src/ext/ldap/ldap.c: In function ‘_php_ldap_control_from_array’:
./php-src/ext/ldap/ldap.c:390:9: error: unknown type name ‘LDAPSortKey’
390 | LDAPSortKey** sort_keys = NULL;
| ^~~~~~~~~~~
./php-src/ext/ldap/ldap.c:423:58: error: ‘LDAP_CONTROL_PAGEDRESULTS’ undeclared (first use in this function); did you mean ‘LDAP_CONTROL_MANAGEDSAIT’?
423 | } else if (strcmp(ZSTR_VAL(control_oid), LDAP_CONTROL_PAGEDRESULTS) == 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| LDAP_CONTROL_MANAGEDSAIT
./php-src/ext/ldap/ldap.c:441:30: warning: implicit declaration of function ‘ldap_create_page_control_value’ [-Wimplicit-function-declaration]
441 | rc = ldap_create_page_control_value(ld, pagesize, &cookie, &control_value);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./php-src/ext/ldap/ldap.c:445:58: error: ‘LDAP_CONTROL_ASSERT’ undeclared (first use in this function); did you mean ‘LDAP_CONTROL_MANAGEDSAIT’?
445 | } else if (strcmp(ZSTR_VAL(control_oid), LDAP_CONTROL_ASSERT) == 0) {
| ^~~~~~~~~~~~~~~~~~~
| LDAP_CONTROL_MANAGEDSAIT
./php-src/ext/ldap/ldap.c:460:53: error: ‘LDAP_OPT_RESULT_CODE’ undeclared (first use in this function); did you mean ‘LDAP_OPT_RESTART’?
460 | ldap_set_option(ld, LDAP_OPT_RESULT_CODE, &success);
| ^~~~~~~~~~~~~~~~~~~~
| LDAP_OPT_RESTART
./php-src/ext/ldap/ldap.c:463:38: warning: implicit declaration of function ‘ldap_create_assertion_control_value’ [-Wimplicit-function-declaration]
463 | rc = ldap_create_assertion_control_value(ld, ZSTR_VAL(assert), &control_value);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./php-src/ext/ldap/ldap.c:469:58: error: ‘LDAP_CONTROL_VALUESRETURNFILTER’ undeclared (first use in this function)
469 | } else if (strcmp(ZSTR_VAL(control_oid), LDAP_CONTROL_VALUESRETURNFILTER) == 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./php-src/ext/ldap/ldap.c:475:39: warning: implicit declaration of function ‘ber_alloc_t’ [-Wimplicit-function-declaration]
475 | ber = ber_alloc_t(LBER_USE_DER);
| ^~~~~~~~~~~
./php-src/ext/ldap/ldap.c:475:37: warning: assignment to ‘BerElement *’ {aka ‘struct berelement *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
475 | ber = ber_alloc_t(LBER_USE_DER);
| ^
./php-src/ext/ldap/ldap.c:485:45: warning: implicit declaration of function ‘ldap_put_vrFilter’ [-Wimplicit-function-declaration]
485 | if (ldap_put_vrFilter(ber, ZSTR_VAL(tmpstring)) == -1) {
| ^~~~~~~~~~~~~~~~~
./php-src/ext/ldap/ldap.c:488:52: warning: implicit declaration of function ‘ber_flatten2’ [-Wimplicit-function-declaration]
488 | } else if (ber_flatten2(ber, &control_value, control_value_alloc) == -1) {
| ^~~~~~~~~~~~
./php-src/ext/ldap/ldap.c:493:59: error: ‘LDAP_CONTROL_PRE_READ’ undeclared (first use in this function); did you mean ‘LDAP_CONTROL_PWDEXPIRED’?
493 | } else if ((strcmp(ZSTR_VAL(control_oid), LDAP_CONTROL_PRE_READ) == 0) || (strcmp(ZSTR_VAL(control_oid), LDAP_CONTROL_POST_READ) == 0)) {
| ^~~~~~~~~~~~~~~~~~~~~
| LDAP_CONTROL_PWDEXPIRED
./php-src/ext/ldap/ldap.c:493:122: error: ‘LDAP_CONTROL_POST_READ’ undeclared (first use in this function); did you mean ‘LDAP_CONTROL_NOT_FOUND’?
493 | } else if ((strcmp(ZSTR_VAL(control_oid), LDAP_CONTROL_PRE_READ) == 0) || (strcmp(ZSTR_VAL(control_oid), LDAP_CONTROL_POST_READ) == 0)) {
| ^~~~~~~~~~~~~~~~~~~~~~
| LDAP_CONTROL_NOT_FOUND
./php-src/ext/ldap/ldap.c:499:37: warning: assignment to ‘BerElement *’ {aka ‘struct berelement *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
499 | ber = ber_alloc_t(LBER_USE_DER);
| ^
./php-src/ext/ldap/ldap.c:530:41: warning: implicit declaration of function ‘ber_init2’; did you mean ‘ber_init’? [-Wimplicit-function-declaration]
530 | ber_init2( ber, NULL, LBER_USE_DER );
| ^~~~~~~~~
| ber_init
./php-src/ext/ldap/ldap.c:532:45: warning: implicit declaration of function ‘ber_printf’; did you mean ‘php_printf’? [-Wimplicit-function-declaration]
532 | if (ber_printf(ber, "{v}", ldap_attrs) == -1) {
| ^~~~~~~~~~
| php_printf
./php-src/ext/ldap/ldap.c:545:58: error: ‘LDAP_CONTROL_SORTREQUEST’ undeclared (first use in this function); did you mean ‘LDAP_CONTROL_NOT_FOUND’?
545 | } else if (strcmp(ZSTR_VAL(control_oid), LDAP_CONTROL_SORTREQUEST) == 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
| LDAP_CONTROL_NOT_FOUND
In file included from ./php-src/Zend/zend.h:30,
from ./php-src/main/php.h:31,
from ./php-src/ext/ldap/ldap.c:29:
./php-src/ext/ldap/ldap.c:550:71: error: ‘LDAPSortKey’ undeclared (first use in this function)
550 | sort_keys = safe_emalloc((num_keys+1), sizeof(LDAPSortKey*), 0);
| ^~~~~~~~~~~
./php-src/Zend/zend_alloc.h:154:73: note: in definition of macro ‘safe_emalloc’
154 | #define safe_emalloc(nmemb, size, offset) _safe_emalloc((nmemb), (size), (offset) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
| ^~~~
./php-src/ext/ldap/ldap.c:550:83: error: expected expression before ‘)’ token
550 | sort_keys = safe_emalloc((num_keys+1), sizeof(LDAPSortKey*), 0);
| ^
./php-src/Zend/zend_alloc.h:154:73: note: in definition of macro ‘safe_emalloc’
154 | #define safe_emalloc(nmemb, size, offset) _safe_emalloc((nmemb), (size), (offset) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
| ^~~~
./php-src/ext/ldap/ldap.c:574:45: error: request for member ‘attributeType’ in something not a structure or union
574 | sort_keys[i]->attributeType = ZSTR_VAL(tmpstrings1[num_tmpstrings1]);
| ^~
./php-src/ext/ldap/ldap.c:583:53: error: request for member ‘orderingRule’ in something not a structure or union
583 | sort_keys[i]->orderingRule = ZSTR_VAL(tmpstrings2[num_tmpstrings2]);
| ^~
./php-src/ext/ldap/ldap.c:586:53: error: request for member ‘orderingRule’ in something not a structure or union
586 | sort_keys[i]->orderingRule = NULL;
| ^~
./php-src/ext/ldap/ldap.c:590:53: error: request for member ‘reverseOrder’ in something not a structure or union
590 | sort_keys[i]->reverseOrder = zend_is_true(tmp);
| ^~
./php-src/ext/ldap/ldap.c:592:53: error: request for member ‘reverseOrder’ in something not a structure or union
592 | sort_keys[i]->reverseOrder = 0;
| ^~
./php-src/ext/ldap/ldap.c:598:30: warning: implicit declaration of function ‘ldap_create_sort_control_value’ [-Wimplicit-function-declaration]
598 | rc = ldap_create_sort_control_value(ld, sort_keys, &control_value);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./php-src/ext/ldap/ldap.c:602:58: error: ‘LDAP_CONTROL_VLVREQUEST’ undeclared (first use in this function)
602 | } else if (strcmp(ZSTR_VAL(control_oid), LDAP_CONTROL_VLVREQUEST) == 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~
./php-src/ext/ldap/ldap.c:604:25: error: unknown type name ‘LDAPVLVInfo’; did you mean ‘LDAPFiltInfo’?
604 | LDAPVLVInfo vlvInfo;
| ^~~~~~~~~~~
| LDAPFiltInfo
./php-src/ext/ldap/ldap.c:609:40: error: request for member ‘ldvlv_before_count’ in something not a structure or union
609 | vlvInfo.ldvlv_before_count = zval_get_long(tmp);
| ^
./php-src/ext/ldap/ldap.c:617:40: error: request for member ‘ldvlv_after_count’ in something not a structure or union
617 | vlvInfo.ldvlv_after_count = zval_get_long(tmp);
| ^
./php-src/ext/ldap/ldap.c:632:40: error: request for member ‘ldvlv_attrvalue’ in something not a structure or union
632 | vlvInfo.ldvlv_attrvalue = &attrValue;
| ^
./php-src/ext/ldap/ldap.c:634:40: error: request for member ‘ldvlv_attrvalue’ in something not a structure or union
634 | vlvInfo.ldvlv_attrvalue = NULL;
| ^
./php-src/ext/ldap/ldap.c:635:40: error: request for member ‘ldvlv_offset’ in something not a structure or union
635 | vlvInfo.ldvlv_offset = zval_get_long(tmp);
| ^
./php-src/ext/ldap/ldap.c:638:48: error: request for member ‘ldvlv_count’ in something not a structure or union
638 | vlvInfo.ldvlv_count = zval_get_long(tmp);
| ^
./php-src/ext/ldap/ldap.c:658:40: error: request for member ‘ldvlv_context’ in something not a structure or union
658 | vlvInfo.ldvlv_context = &context;
| ^
./php-src/ext/ldap/ldap.c:660:40: error: request for member ‘ldvlv_context’ in something not a structure or union
660 | vlvInfo.ldvlv_context = NULL;
| ^
./php-src/ext/ldap/ldap.c:665:30: warning: implicit declaration of function ‘ldap_create_vlv_control_value’ [-Wimplicit-function-declaration]
665 | rc = ldap_create_vlv_control_value(ld, &vlvInfo, &control_value);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./php-src/ext/ldap/ldap.c:676:22: warning: implicit declaration of function ‘ldap_control_create’; did you mean ‘ldap_control_free’? [-Wimplicit-function-declaration]
676 | rc = ldap_control_create(ZSTR_VAL(control_oid), control_iscritical, &control_value, 1, ctrl);
| ^~~~~~~~~~~~~~~~~~~
| ldap_control_free
./php-src/ext/ldap/ldap.c:699:17: warning: implicit declaration of function ‘ber_memfree’; did you mean ‘ber_free’? [-Wimplicit-function-declaration]
699 | ber_memfree(control_value.bv_val);
| ^~~~~~~~~~~
| ber_free
./php-src/ext/ldap/ldap.c:708:31: error: ‘sortp’ undeclared (first use in this function)
708 | LDAPSortKey** sortp = sort_keys;
| ^~~~~
gmake: *** [Makefile:1533: ext/ldap/ldap.lo] Error 1
gmake: *** Waiting for unfinished jobs....
But I expected this output instead:
# Successful build
When using OpenLDAP, build works. Issue is that Oracle's LDAP implementation lacks several features added to ext/ldap with only OpenLDAP in mind. As far as I see this hasn't been reported by anyone yet, so I would simply suggest to remove the Oracle's LDAP adjustments in the build system so the OpenLDAP is used there only (./configure --with-ldap).
EDIT: This has been also reported at https://bugs.php.net/80926
- Oracle Instant Client 19.23
PHP Version
PHP 8.2+
Operating System
Oracle Solaris 11.4
Activity
cmb69 commentedon Jul 21, 2024
/cc @cjbj
Girgias commentedon Jul 21, 2024
Possibly also cc @MCMic
cjbj commentedon Jul 22, 2024
Yes, I believe ldap/config.m4 should be updated and the Oracle references removed.
Instant Client has an older version/API of LDAP. This is almost certain to never change - you can follow up Oracle bug 14049255 I logged ages ago that isn't go to go anywhere. In summary, don't build PHP's LDAP extension with Instant Client.
If you ever need to have both PHP LDAP and OCI8 installed, the traditional technique was to add OCI8 as a shared library after PHP was built.
Remove LDAP build with Oracle instant client
NattyNarwhal commentedon Jul 22, 2024
I also saw in
ext/ldap/config.m4that it seems to support Solaris LDAP too, not just OpenLDAP. Does the extension still work with non-OpenLDAP implementations, or should we just commit to OpenLDAP only? Windows version seems to be hardcoded for OpenLDAP.cmb69 commentedon Jul 22, 2024
Right, and I'm not aware of any requests to open this for other LDAP implementations. And regarding the official Windows builds, I don't think that there are any plans to use another implementation.
petk commentedon Jul 22, 2024
There is now initial PR created #15067
However, I'm probably missing something more here. The
ldap_connect_walletfunction was implemented in PHP 8.3 when HAVE_ORALDAP symbol is defined. As an alternative to theldap_connect()with 3 arguments specific to Oracle. But I have no idea how this was meant to work without Oracle Instant Client. Does perhaps @kocsismate know about this what to do here?Oracle Instant Client provides also 3 specific constants: GSLC_SSL_NO_AUTH, GSLC_SSL_ONEWAY_AUTH, and GSLC_SSL_TWOWAY_AUTH, which would also be removed with this... Regarding these 3 constants there was also a fix done in master (current PHP-8.4-dev) branch #14313 so I think removal of these 3 is not problematic as they were never available in PHP actually.
cmb69 commentedon Jul 22, 2024
I think #5177 (comment) clarifies this a bit.
petk commentedon Jul 22, 2024
Thanks. This makes sense now :) Got it. Let's wait with all of this until PHP 9 then and remove it then.
cmb69 commentedon Jul 23, 2024
I was looking for the mentioned RFC in the wrong place, but finally found it.
Anyhow, isn't there a place now where such future changes are tracked? If so, this ticket could be closed.
petk commentedon Jul 23, 2024
I'm not sure there is any tracker for these. I'd prefer to leave this opened because this is sort of a separate issue related to the build system also. By removing the Oracle Instant Client installation feature all Oracle specific LDAP features are also removed. And by having current implementation there is no way to use this function realistically without some heavy patching of C code. Which is not good at all.
cmb69 commentedon Jul 23, 2024
https://wiki.php.net/rfc#pending_implementationlanding already tracks the remaining parts of https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures.
Oh now I see! I consider it quite likely that this needs to be fixed; otherwise the
ldap_connect()section of the mentioned RFC would have been pretty pointless (or maybe worse). /cc @kocsismatecmb69 commentedon Jul 24, 2024
PHP 8.4 RMs might be interested in this: @ericmann, @NattyNarwhal, @SakiTakamachi.
NattyNarwhal commentedon Jul 24, 2024
Did we ever get any bug reports about the Oracle LDAP stuff not building before? Since it straight up didn't compile, it's arguably a BC break if we remove it for 8.4, but if a tree falls in the woods and no one hears it....
petk commentedon Jul 24, 2024
Yes, sorry. I forgot to mention in the comments. I've only edited above post about the previous report, but this was reported also here:
https://bugs.php.net/80926
cmb69 commentedon Jul 24, 2024
Oh, I thought this was related to unbundling oci8 and pdo_oci. If not, than this is nothing new regarding PHP 8.4, but I still wonder why
ldap_connect_wallet()had been introduced in the first place.kocsismate commentedon Jul 24, 2024
It was because I thought that people needed the functionality provided by
ldap_connect()whenHAVE_ORALDAPis available. But to be honest I didn't know that Oracle Instant Client support is completely wrecked, since I didn't perform tests under this system. :/cmb69 commentedon Jul 24, 2024
At least someone should have noticed this, ideally before you had invested all the time.
petk commentedon Jul 24, 2024
Well, that's good news then so it's clear that the
ldap_connect_wallet()is meant only for LDAP installation with Oracle Instant Client. So, basically these two are "breaking changes":The issue is how to handle this because there was an RFC created for it and everything. I'd suggest to simply remove all of these in PHP-9. Or if someone creates a super fast RFC for PHP-8.4 to deprecate the
ldap_connect_walletand Oracle Instant Client installation. 🤔 Probably timeline before the 8.4 feature freeze is too short for all of this.cmb69 commentedon Jul 24, 2024
Maybe we should be pragmatic here: we know there is broken functionality, but so far nobody has committed to fix. Okay. If someone provides a fix, we should merge it; if "many" people complain that the functionality is broken, and offer help to fix it, we might fix it. And if the functionality gets fixed, the RFC can proceed as planned. If it doesn't get fixed, we still can consider what to do about it for PHP 9.
MCMic commentedon Nov 9, 2024
As far as I know documentation always said only openldap library is supported, since a long time ago.
I merged a community PR to re-add support for solaris at some point.
I am not sure I understand the benefit of building PHP with other ldap library with less features, it makes for a php-ldap with missing functions and constants. It forces apps using php-ldap to test function_exists and stuff on functions.
cmb69 commentedon Nov 9, 2024
I've written to the list regarding the deprecation: https://externals.io/message/125933
cmb69 commentedon Feb 21, 2025
The deprecation proposal is now part of https://wiki.php.net/rfc/deprecations_php_8_5.