Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 482340

Summary: net-nds/phpldapadmin - broken with php-5.5
Product: Gentoo Linux Reporter: masc <masc>
Component: [OLD] ServerAssignee: Víctor Ostorga (RETIRED) <vostorga>
Status: RESOLVED FIXED    
Severity: normal CC: alexanders83, dschridde+gentoobugs, ironiridis, jmbsvicetto, mail, web-apps
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://bugzilla.redhat.com/show_bug.cgi?id=974928
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Paweł Tomulik's Patch
upstream patch for building with PHP5.5
patch for ebuild
ebuild for 1.2.3-r1
fix password_hash function redefine
fix warning about preg_replace /e switch
Add PHP version dep for existing 1.2.3
update patch to use pla prefix, include two more locations

Description masc 2013-08-24 17:38:52 UTC
phpldapadmin redeclares password_hash which causes an error with php-5.5.

A patch is available
https://bugzilla.redhat.com/attachment.cgi?id=762008&action=diff

Reproducible: Always
Comment 1 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-08-24 23:21:47 UTC
Which version of phpldapadmin is broken? All of them?
Comment 2 masc 2013-08-24 23:31:29 UTC
1.2.2 and 1.2.3 for sure.

basically any version declaring the function password_hash in lib/functions.php.
Comment 3 Jenny Danzmayr 2013-09-01 16:26:20 UTC
I can confirm this bug.
Paweł Tomulik posted a patch @Debian Bug Repots
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=710854

I've successfully tested it with dev-lang/php-5.5.2 and net-nds/phpldapadmin-1.2.3
I'll attach his patch
Comment 4 Jenny Danzmayr 2013-09-01 16:27:15 UTC
Created attachment 357568 [details, diff]
Paweł Tomulik's Patch
Comment 6 Dennis Schridde 2013-10-19 16:07:10 UTC
(In reply to Dennis Schridde from comment #5)

Attachment #357568 [details, diff] is definitely not sufficient:

Error
E_WARNING: password_hash() expects parameter 2 to be long, string given

From: lib/PageRender.php (290)
Comment 7 Alexander Stein 2014-02-21 08:40:48 UTC
Created attachment 370938 [details, diff]
upstream patch for building with PHP5.5
Comment 8 Alexander Stein 2014-02-21 08:41:54 UTC
Created attachment 370940 [details, diff]
patch for ebuild
Comment 9 Alexander Stein 2014-02-21 08:42:37 UTC
I've added 2 patched adding the patch from upstream (http://sourceforge.net/u/nihilisticz/phpldapadmin/ci/7e53dab990748c546b79f0610c3a7a58431e9ebc/). This fixes the problem for me.
Comment 10 Christohper Harrington 2014-03-28 16:56:55 UTC
Can we block <=net-nds/phpldapadmin-1.2.3 with >=dev-lang/php-5.5, and ship these patches from http://sourceforge.net/u/nihilisticz/phpldapadmin/ci/7e53dab990748c546b79f0610c3a7a58431e9ebc/ as -1.2.3-r1 ?
Comment 11 Christohper Harrington 2014-03-28 17:28:50 UTC
Created attachment 373756 [details]
ebuild for 1.2.3-r1
Comment 12 Christohper Harrington 2014-03-28 17:29:45 UTC
Created attachment 373758 [details, diff]
fix password_hash function redefine
Comment 13 Christohper Harrington 2014-03-28 17:30:06 UTC
Created attachment 373760 [details, diff]
fix warning about preg_replace /e switch
Comment 14 Christohper Harrington 2014-03-28 17:48:20 UTC
Created attachment 373762 [details, diff]
Add PHP version dep for existing 1.2.3
Comment 15 masc 2014-03-28 18:20:48 UTC
(In reply to Christohper Harrington from comment #10)
> Can we block <=net-nds/phpldapadmin-1.2.3 with >=dev-lang/php-5.5, and ship
> these patches from
> http://sourceforge.net/u/nihilisticz/phpldapadmin/ci/
> 7e53dab990748c546b79f0610c3a7a58431e9ebc/ as -1.2.3-r1 ?

sure, 1.2.3 is the way forward. I wouldn't see a reason to stick with an older version anyhow, as they are all in unstable/testing.
Comment 16 Christohper Harrington 2014-03-28 18:51:25 UTC
Created attachment 373766 [details, diff]
update patch to use pla prefix, include two more locations

Previous patch defined password_hash_custom, but convention says a prefix is more future-proof than a suffix. Use pla_* rather than *_custom. Also previous patch missed two locations where the password_hash function was being referenced.
Comment 17 Christohper Harrington 2014-04-03 13:13:27 UTC
What is the next step here? There's an ebuild file and patches. Can this be confirmed? Or can someone send me a link to the process for committing this to portage and assign this bug to me?
Comment 18 Christohper Harrington 2014-04-10 18:34:51 UTC
Can this bug be reassigned?
Comment 19 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2014-04-10 19:59:28 UTC
I've committed 1.2.3-r1 to my overlay. I'll add it to the tree later when I get home.
Comment 20 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2014-04-11 01:50:43 UTC
01:36 < irker869> gentoo-x86: jmbsvicetto net-nds/phpldapadmin: Add a patch to allow phpldapadmin to build against php-5.5. Bump to EAPI 5. Fixes bug 482340 - thanks to Alexander Stein.

Done.