Bug 32909 - phpldapadmin on mageia 9 is incompatible with our php 8
Summary: phpldapadmin on mageia 9 is incompatible with our php 8
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 9
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL: https://github.com/leenooks/phpLDAPad...
Whiteboard: MGA9-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2024-02-29 01:27 CET by Bruno Cornec
Modified: 2024-04-05 20:25 CEST (History)
4 users (show)

See Also:
Source RPM: phpldapadmin-1.2.6.3-2.mga9.src.rpm
CVE:
Status comment:


Attachments

Description Bruno Cornec 2024-02-29 01:27:01 CET
Description of problem:
phpldapadmin on mageia 9 is incompatible with our php 8


Version-Release number of selected component (if applicable):
phpldapadmin-1.2.6.3-2.mga9.src.rpm

How reproducible:
Each time

Steps to Reproduce:
1. install phpldapadmin
2. connect to it through http://server/phpldapadmin
3. get error message:
Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc() in /usr/share/phpldapadmin/lib/common.php:299 Stack trace: #0 /usr/share/phpldapadmin/htdocs/common.php(13): require_once() #1 /usr/share/phpldapadmin/htdocs/cmd.php(13): require_once('...') #2 /usr/share/phpldapadmin/htdocs/index.php(153): include('...') #3 {main} thrown in /usr/share/phpldapadmin/lib/common.php on line 299

Upstream recognize the issue:
https://github.com/leenooks/phpLDAPadmin/issues/133

I think we should remove it pending the version 2.x which should be compatible or build a pre-release instead. For now our package is useless.
Comment 1 Lewis Smith 2024-02-29 14:09:22 CET
Thank you for the report.

Summary     : A web-based LDAP administration tool

Yes, the upstream bug is unambiguous:
- sadly PHP 8.0 is not supported
- PLA v2 will support PHP 8 and later.

version 1.2.6.3 is 2y old. Cauldron has a more recent version 1.2.6.6 since 5m, but it is unlikely that will help. The latest project release is 1.2.6.7. The project site at the package URL http://phpldapadmin.sourceforge.net
says " Last Update: 2014-05-04 ", which looks as if the site is no longer valid. Indeed, it should now be
 https://github.com/leenooks/phpLDAPadmin
which says "
    NOTE: GIT master is currently in active development, and as such functionality may be missing, broken or not working as expected.
    If you are after a working version of PLA, please use one of the tagged releases."

In the 20 listed 'issues', no sign of PHP8 nor the one Bruno found.

I can see nothing about v2 except in the Wiki:
"After a long hiatsus with PLA v1.2, v2 is currently being created, and is a complete re-write leveraging modern development techniques and technology that didnt exist in 2002.
PLA v2 IS NOT YET COMPLETE so expect functionality to be missing, bugs to exist and things to be broken"

Marking this as an Upstream issue; assigning to Marc since he normally deals with this SRPM. Sit & wait.

Status: NEW => UPSTREAM
Keywords: (none) => UPSTREAM
Assignee: bugsquad => mageia

Comment 2 Marc Krämer 2024-02-29 20:51:34 CET
As far as I can tell, 1.2.6.7 should run on php 8.3. There is only one source file, which has errors (and this is only used for debugging).

Pushed an update to core/updates_testing
Comment 3 Marc Krämer 2024-02-29 20:59:16 CET
to be honest, I don't have any good testing here. But a simple syntax checking told me, this version should "run" with php 8, without the issue above.


Updated phpldapadmin package:

The version shipped with mga9 does not run on php 8.2 or 8.3. This update fixes this issue and brings some security enhancements.

References:
https://github.com/leenooks/phpLDAPadmin/releases/tag/1.2.6.7
========================

Updated packages in core/updates_testing:
========================
phpldapadmin-1.2.6.7-1.mga9.noarch.rpm

SRPM:
phpldapadmin-1.2.6.7-1.mga9.src.rpm

Assignee: mageia => qa-bugs
Status: UPSTREAM => NEW

Comment 4 Marc Krämer 2024-02-29 21:00:09 CET
@Bruno: can you test the new package, I guess you have an ldap running.

CC: (none) => mageia

Comment 5 Herman Viaene 2024-03-04 14:44:48 CET
Not sure how to handle this. Reading a bit, made sure httpd ans slapd are running, but in the start page of phpldapadmin I get:
	Error
Unrecognized error number: 8192: Creation of dynamic property page::$index is deprecated
PHP Debug Backtrace
File	/usr/share/phpldapadmin/lib/functions.php (192)
 	Function	error (a:5:{i:0;s:88:"Unrecognized error number: 8192: Cr...)
File	/usr/share/phpldapadmin/lib/page.php (38)
 	Function	app_error_handler (a:4:{i:0;i:8192;i:1;s:55:"Creation of dynamic prop...)
File	/usr/share/phpldapadmin/htdocs/cmd.php (41)
 	Function	__construct (a:1:{i:0;i:1;})

CC: (none) => herman.viaene

Comment 6 Marc Krämer 2024-03-04 15:16:08 CET
Thanks Herman. True this is a deprecated php "feature". You have to declare all used attributes. Usally this just emits deprecated warnings. But if the installed an error handler, this is thrown.

I can have a look at it, if we can provide a patch, or ask upstream for >php 8.2 support.
Marc Krämer 2024-03-04 21:53:06 CET

URL: (none) => https://github.com/leenooks/phpLDAPadmin/issues/260

Comment 7 Marc Krämer 2024-03-05 19:17:03 CET
added an upstream patch (from debian) for php8 support.

This should hold until php 9 is released. But hopefully they update their code.


The new build (rel -2) is running right now. Should be available on mirrors soon.
Comment 8 katnatek 2024-03-07 19:14:44 CET
Look like ready to test

Package in 9/core/updates_testing

phpldapadmin-1.2.6.7-2.mga9.noarch.rpm


SRPM:
phpldapadmin-1.2.6.7-2.mga9.src.rpm
Comment 9 Herman Viaene 2024-03-12 16:30:01 CET
Installed new version, and error does not reproduce.
I get a decent home page for phpldapadmin, but configuring it is beyond me, especially how to configure its password despite looking at tutorials and videos.
If that is good enough, let me know, I'll give it the OK.
Comment 10 katnatek 2024-03-12 21:33:51 CET
Bruno, the package in testing works for you?
katnatek 2024-03-12 21:50:15 CET

Keywords: UPSTREAM => advisory

Comment 11 Thomas Andrews 2024-04-04 22:40:35 CEST
In the absence of a response from Bruno, I'm giving this an OK and validating.

Keywords: (none) => validated_update
Whiteboard: (none) => MGA9-64-OK
CC: (none) => andrewsfarm, sysadmin-bugs

Comment 12 Mageia Robot 2024-04-05 20:25:33 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2024-0122.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.