phpldapadmin incompatible with php-7.2 in bionic

Bug #1829987 reported by Lars Kollstedt
46
This bug affects 8 people
Affects Status Importance Assigned to Milestone
phpldapadmin (Ubuntu)
Fix Released
Undecided
William Desportes

Bug Description

Hi,

on Ubuntu 18.4 LTS bionic phpldapadmin prints the following messages:

Deprecated: Function create_function() is deprecated in /usr/share/phpldapadmin/lib/functions.php on line 1083

Notice: Undefined variable: _SESSION in /usr/share/phpldapadmin/lib/session_functions.php on line 100

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/phpldapadmin/lib/functions.php:1083) in /usr/share/phpldapadmin/lib/page.php on line 65

Error
E_WARNING: Cannot modify header information - headers already sent by (output started at /usr/share/phpldapadmin/lib/functions.php:1083)
PHP Debug Backtrace
File /usr/share/phpldapadmin/lib/functions.php (184)
  Function error (a:5:{i:0;s:136:"E_WARNING: Cannot modify header in...)
File /usr/share/phpldapadmin/lib/functions.php ()
  Function app_error_handler (a:5:{i:0;i:2;i:1;s:125:"Cannot modify header infor...)
File /usr/share/phpldapadmin/lib/common.php (270)
  Function header (a:2:{i:0;s:38:"Content-type: text/html; charset=UT...)
File /usr/share/phpldapadmin/htdocs/common.php (13)
  Function require_once (a:1:{i:0;s:38:"/usr/share/phpldapadmin/lib/common....)
File /usr/share/phpldapadmin/htdocs/cmd.php (13)
  Function require_once (a:1:{i:0;s:41:"/usr/share/phpldapadmin/htdocs/comm...)
File /usr/share/phpldapadmin/htdocs/index.php (146)
  Function include (a:1:{i:0;s:38:"/usr/share/phpldapadmin/htdocs/cmd....)

Printing warnings to the HTML output is deactivated in my servers php configuration. So this must be turned on again somewhere in the code of phpldapadmin.

As far as I can see Ubuntu 18.10 Cosmic, 19.4 Disco and the upcoming (19.10) Eoan should be also affected, but I'm experiencing this on Ubuntu 18.4 bionic.

This issues were already discussed in:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890127
and
https://github.com/leenooks/phpLDAPadmin/issues/61

Logging in to phpldapadmin isn't possible due to that.

Kind regards,
    Lars

Tags: bionic patch
Revision history for this message
Lars Kollstedt (lk-x) wrote : [Bug 1829987] phpldapadmin incompatible with php-7.2 in bionic

Hi again,

for Ubuntu 18.4 bionic LTS I cherry picked the following three commits from
https://github.com/leenooks/phpLDAPadmin
and build the appended php-7.2-compat.patch from that:
1. https://github.com/leenooks/phpLDAPadmin/commit/49ef60f26b78a81dbaa9727be11ee3fb8db0b5bb
2. https://github.com/leenooks/phpLDAPadmin/commit/73b7795bc0b232491de35dd91ad9ea86ad34eae8
3. https://github.com/leenooks/phpLDAPadmin/commit/e37b498de19a5301188bc8d93b0b67d7ce717d3a

That works for me on bionic.

On newer releases this should also apply but you might need additional commits/patches e.g.
Fix for PHP 7.3 - deprecated continue in switch
https://github.com/leenooks/phpLDAPadmin/commit/7b1f6b5132204836a75674045309edb7005b87d2

For Ubuntu 19.10 Eoan I would suggest to upgrade to a newer upstream version from <https://github.com/leenooks/phpLDAPadmin>. As far as I can see this moved from sourceforge to github not long ago, and the code base of phpldapadmin you're relaying on seems to be quite old. ;-)

I'm also crossposting this patch suggestion to the debian bug, since the debian packages are still containing the same issue as far as I can see. My launchpad Bug for this is on <https://bugs.launchpad.net/ubuntu/+source/phpldapadmin/+bug/1829987>.

Kind regargs,
    Lars

--
Lars Kollstedt

Telefon: +49 6151 16-71027
E-Mail: <email address hidden>

man-da.de GmbH
Dolivostraße 11
64293 Darmstadt

Sitz der Gesellschaft: Darmstadt
Amtsgericht Darmstadt, HRB 9484
Geschäftsführer: Andreas Ebert

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "php-7.2-compat.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
David White (cppege-david-9ei9ny) wrote :

A fix is also discussed here:

https://github.com/leenooks/phpLDAPadmin/issues/61

Can we expect a fixed version to be available soon on Ubuntu? I'd hate to have to wait till 20.04!

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in phpldapadmin (Ubuntu):
status: New → Confirmed
Revision history for this message
Lars Kollstedt (lk-x) wrote : Re: [Bug 1829987] Re: phpldapadmin incompatible with php-7.2 in bionic

Hi David,

on Mittwoch, 11. September 2019 12:53:37 CEST you wrote:
> A fix is also discussed here:
>
> https://github.com/leenooks/phpLDAPadmin/issues/61
>
I already mentioned this in my initial bug report. It's the source where I got
the hint to the commits, the patch is build from. The commit from Pull Request
#62 got additional commits.

> Can we expect a fixed version to be available soon on Ubuntu?
> I'd hate to have to wait till 20.04!
I opened this because I would like to have this fix (from the patch) in bionic
and hopefully something like this in newer versions. I'm running a patched
version from our internal repo. It's build by just appending the patch to the
patch sequence.

So I of course can't say anything to this.

> ** Bug watch added: github.com/leenooks/phpLDAPadmin/issues #61
> https://github.com/leenooks/phpLDAPadmin/issues/61

Obviously References to external bugs are handled differently in comments,
than in the initial bug description. But that's not our topic here.

Does this also happen with the (as far as I can see) still unresolved Debian
Bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890127 ? It's in the
same state as the bug here, an I understand it as an upstream bug report.

Kind regards,
 Lars

--
Lars Kollstedt

Telefon: +49 6151 16-71027
E-Mail: <email address hidden>

man-da.de GmbH
Dolivostraße 11
64293 Darmstadt

Sitz der Gesellschaft: Darmstadt
Amtsgericht Darmstadt, HRB 9484
Geschäftsführer: Andreas Ebert

Revision history for this message
Felipe Reyes (freyes) wrote :

I prepared a ppa for testing purposes, if someone is interested in giving it a try please report back on how it works for you - https://launchpad.net/~freyes/+archive/ubuntu/lp1829987

Changed in phpldapadmin (Ubuntu):
status: Confirmed → Fix Released
assignee: nobody → William Desportes (williamdes)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.