net/phpldapadmin works so far without problems with lang/php74 on FreeBSD 13-STABLE, 13.0-RELENG and 14-CURRENT without problems. Updating to lang/php80 renders several php based ports buggy or unusable, including www/nextcloud and especially net/phpldapadmin, which is reported here. The backend is OpenLDAP 2.4 from the latest port's tree sources, working without errors so far. On recent CURRENT (for instance, 14.0-CURRENT FreeBSD 14.0-CURRENT #61 main-n253116-39a36707bd3: Sat Feb 12 12:09:15 CET 2022 amd64), running a www/apache24 web server, lang/php80 (all php ports or related ports rebuilt via portmaster -dfR), net/openldap24-server (also recompiled recently), the phpldapadmin webinterface now provides me with an error: [...] Deprecated: Required parameter $data follows optional parameter $subitem in /usr/local/www/phpldapadmin/lib/functions.php on line 931 Deprecated: Required parameter $index follows optional parameter $attr_name in /usr/local/www/phpldapadmin/lib/functions.php on line 2049 Warning: Undefined variable $_SESSION in /usr/local/www/phpldapadmin/lib/session_functions.php on line 100 Logo Fatal error: Uncaught Error: Undefined constant "DEBUG_ENABLED" in /usr/local/www/phpldapadmin/lib/config_default.php:732 Stack trace: #0 /usr/local/www/phpldapadmin/lib/functions.php(383): Config->isCommandAvailable() #1 /usr/local/www/phpldapadmin/lib/page.php(158): cmd_control_pane() #2 /usr/local/www/phpldapadmin/lib/page.php(400): page->head_print() #3 /usr/local/www/phpldapadmin/lib/functions.php(644): page->display() #4 /usr/local/www/phpldapadmin/lib/functions.php(190): error() #5 [internal function]: app_error_handler() #6 /usr/local/www/phpldapadmin/lib/session_functions.php(96): session_name() #7 /usr/local/www/phpldapadmin/lib/common.php(159): app_session_start() #8 /usr/local/www/phpldapadmin/htdocs/common.php(13): require_once('...') #9 /usr/local/www/phpldapadmin/htdocs/cmd.php(13): require_once('...') #10 /usr/local/www/phpldapadmin/htdocs/index.php(153): include('...') #11 {main} thrown in /usr/local/www/phpldapadmin/lib/config_default.php on line 732
Does upstream declare/intend PHP 8.0 support for this port version?
I think that developers of PLA have not declared php8 compatibility, but they are aware of some problems: https://github.com/leenooks/phpLDAPadmin/pull/149/commits/fe337b12450ac58e12a02f68a3c27f7a61b00fcf I will make additional patches in some days, so PLA should work correctly.
Created attachment 231986 [details] patch: support php80 I've made a patch which introduce support for php80. After applying these patches PLA is working correctly. There is no errors in web server logs.
Created attachment 231987 [details] poudriere testport log Poudriere testport log which shows that pla is built without errors
The applied patch fails on the recent ports tree as of today (06th March '22), see below: ... # git pull remote: Enumerating objects: 55, done. remote: Counting objects: 100% (10/10), done. remote: Total 55 (delta 10), reused 10 (delta 10), pack-reused 45 Unpacking objects: 100% (55/55), 167.96 KiB | 211.00 KiB/s, done. From https://git.freebsd.org/ports f1c502089bc9..70454fcda50c main -> origin/main Updating f1c502089bc9..70454fcda50c ... [...] ===> Cleaning for phpldapadmin-php81-1.2.6.3_1 [Sun Mar 06 13:35:07.888954 2022] [so:warn] [pid 87826:tid 35071410176] AH01574: module php_module is already loaded, skipping [Sun Mar 06 13:35:08.913874 2022] [so:warn] [pid 87877:tid 35051597824] AH01574: module php_module is already loaded, skipping [Sun Mar 06 13:35:09.033654 2022] [so:warn] [pid 87885:tid 35090997248] AH01574: module php_module is already loaded, skipping pkg-static: Bad argument on pkg_set 557592857 ===> phpldapadmin-php80-1.2.6.3_1 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by phpldapadmin-php80-1.2.6.3_1 for building ===> Extracting for phpldapadmin-php80-1.2.6.3_1 => SHA256 Checksum OK for leenooks-phpLDAPadmin-1.2.6.3_GH0.tar.gz. ===> Patching for phpldapadmin-php80-1.2.6.3_1 ===> Applying FreeBSD patches for phpldapadmin-php80-1.2.6.3_1 from /usr/ports/net/phpldapadmin/files ====> IGNORING patchfile patch-htdocs_collapse.php.orig ====> IGNORING patchfile patch-htdocs_draw__tree__node.php.orig ====> IGNORING patchfile patch-htdocs_expand.php.orig ====> IGNORING patchfile patch-htdocs_refresh.php.orig ====> IGNORING patchfile patch-lib_Attribute.php.orig ====> IGNORING patchfile patch-lib_AttributeFactory.php.orig ====> IGNORING patchfile patch-lib_BinaryAttribute.php.orig ====> IGNORING patchfile patch-lib_DateAttribute.php.orig ====> IGNORING patchfile patch-lib_DnAttribute.php.orig ====> IGNORING patchfile patch-lib_GidAttribute.php.orig ====> IGNORING patchfile patch-lib_MultiLineAttribute.php.orig ====> IGNORING patchfile patch-lib_ObjectClassAttribute.php.orig ====> IGNORING patchfile patch-lib_PageRender.php.orig ====> IGNORING patchfile patch-lib_PasswordAttribute.php.orig ====> IGNORING patchfile patch-lib_SelectionAttribute.php.orig ====> IGNORING patchfile patch-lib_ShadowAttribute.php.orig ====> IGNORING patchfile patch-lib_Tree.php.orig ====> IGNORING patchfile patch-lib_Visitor.php.orig ====> IGNORING patchfile patch-lib_common.php.orig ====> IGNORING patchfile patch-lib_ds__ldap.php.orig ====> IGNORING patchfile patch-lib_ds__ldap__pla.php.orig ====> IGNORING patchfile patch-lib_functions.php.orig ====> IGNORING patchfile patch-lib_xmlTemplates.php.orig Ignoring previously applied (or reversed) patch. 1 out of 1 hunks ignored--saving rejects to tools/po/Makefile.rej ===> FAILED Applying FreeBSD patch-tools_po_Makefile ===> Cleanly applied FreeBSD patch(es) patch-htdocs_collapse.php patch-htdocs_draw__tree__node.php patch-htdocs_expand.php patch-htdocs_refresh.php patch-lib_Attribute.php patch-lib_AttributeFactory.php patch-lib_Binar yAttribute.php patch-lib_DateAttribute.php patch-lib_DnAttribute.php patch-lib_GidAttribute.php patch-lib_MultiLineAttribute.php patch-lib_ObjectClassAttribute.php patch-lib_PageRender.php patch-lib_PasswordAttribute.ph p patch-lib_SelectionAttribute.php patch-lib_ShadowAttribute.php patch-lib_Tree.php patch-lib_Visitor.php patch-lib_common.php patch-lib_ds__ldap.php patch-lib_ds__ldap__pla.php patch-lib_functions.php patch-lib_xmlTemp lates.php patch-tools__po__Makefile ===> FAILED to apply cleanly FreeBSD patch(es) patch-tools_po_Makefile *** Error code 1 Stop. make[1]: stopped in /usr/ports/net/phpldapadmin *** Error code 1 Stop. make: stopped in /usr/ports/net/phpldapadmin ===>>> make build failed for net/phpldapadmin ===>>> Aborting update ===>>> You can restart from the point of failure with this command line: portmaster <flags> net/phpldapadmin This command has been saved to ~/portmasterfail.txt
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a9c2430bd9f97ff6bfcc2daf9a791f549a1d2f9b commit a9c2430bd9f97ff6bfcc2daf9a791f549a1d2f9b Author: Muhammad Moinur Rahman <bofh@FreeBSD.org> AuthorDate: 2022-03-07 04:40:55 +0000 Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org> CommitDate: 2022-03-07 04:43:50 +0000 net/phpldapadmin: Fix runtime with php80 - Pet portclippy/portfmt PR: 261990 Reported by: ohartmann@walstatt.org Approved by: ports@bsdserwis.com (maintainer) Sponsored by: Bounce Experts net/phpldapadmin/Makefile | 8 +++- .../files/patch-htdocs_collapse.php (new) | 11 ++++++ .../files/patch-htdocs_draw__tree__node.php (new) | 11 ++++++ .../files/patch-htdocs_expand.php (new) | 11 ++++++ .../files/patch-htdocs_refresh.php (new) | 11 ++++++ .../files/patch-lib_Attribute.php (new) | 11 ++++++ .../files/patch-lib_AttributeFactory.php (new) | 11 ++++++ .../files/patch-lib_BinaryAttribute.php (new) | 11 ++++++ .../files/patch-lib_DateAttribute.php (new) | 10 +++++ .../files/patch-lib_DnAttribute.php (new) | 10 +++++ .../files/patch-lib_GidAttribute.php (new) | 10 +++++ .../files/patch-lib_MultiLineAttribute.php (new) | 11 ++++++ .../files/patch-lib_ObjectClassAttribute.php (new) | 10 +++++ .../files/patch-lib_PageRender.php (new) | 31 ++++++++++++++++ .../files/patch-lib_PasswordAttribute.php (new) | 10 +++++ .../files/patch-lib_SelectionAttribute.php (new) | 11 ++++++ .../files/patch-lib_ShadowAttribute.php (new) | 11 ++++++ net/phpldapadmin/files/patch-lib_Tree.php (new) | 11 ++++++ net/phpldapadmin/files/patch-lib_Visitor.php (new) | 43 ++++++++++++++++++++++ net/phpldapadmin/files/patch-lib_common.php (new) | 13 +++++++ .../files/patch-lib_ds__ldap.php (new) | 38 +++++++++++++++++++ .../files/patch-lib_ds__ldap__pla.php (new) | 29 +++++++++++++++ .../files/patch-lib_functions.php (new) | 31 ++++++++++++++++ .../files/patch-lib_xmlTemplates.php (new) | 11 ++++++ ...tools__po__Makefile => patch-tools_po_Makefile} | 2 +- 25 files changed, 374 insertions(+), 3 deletions(-)
Committed with changes.