Page MenuHomePhorge

Fix PHP 8.3 "Usage of ldap_connect with two arguments is deprecated" exception
ClosedPublic

Authored by aklapper on Aug 19 2024, 19:49.

Details

Summary

Per https://www.php.net/manual/en/function.ldap-connect.php the signature $conn = @ldap_connect($host, $this->port); is deprecated since PHP 8.3.
Thus pass a full LDAP URI as the only parameter.

ERROR 8192: Usage of ldap_connect with two arguments is deprecated at [/var/www/html/phorge/phorge/src/applications/auth/adapter/PhutilLDAPAuthAdapter.php:308]

Closes T15724

Test Plan

Set up LDAP as auth provider, try to log in.

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Note that I have NOT properly tested this locally as I still have issues with my LDAP setup.

avivey subscribed.

It might be slightly safer to use PhutilURI, but this is in any case a potentially-unsafe configuration.

This revision is now accepted and ready to land.Sun, Nov 24, 09:32