[horde] Status of PHP 7 support?

Diana Hille hille at b1-systems.de
Wed May 23 07:35:39 UTC 2018



On 05/23/2018 08:00 AM, Ralf Lang wrote:
> Am 22.05.2018 um 23:28 schrieb Andy Dorman:
>> On 5/22/18 4:11 PM, Sebastian Arcus wrote:
>>> As Slackware has finally moved to PHP 7 in -current, I am trying to
>>> get Horde running on PHP 7.2.5. Before posting here about the few
>>> things I'm battling to get going, I wanted to know if there is any
>>> official or unofficial position on the compatibility of Horde with
>>> PHP 7.x. I suppose if there are some known show stoppers, there isn't
>>> much point in trying to get things working. Does anybody know what
>>> the situation is, please? Searching online for Horde + PHP 7 returns
>>> some posts on this list from 2016 - but nothing seemingly more recent.
>>
>> I just finished updating our debian servers 2 days ago to php 7.0.x
>> and I haven't run into any show stoppers so far.  We are using
>> php7.0-fpm and the config was the same as for php5-fpm.
>>
>> The only reason (so far) that we have not moved up to 7.2 is we have a
>> special addition to our Horde code that uses php-mcrypt, and php 7.2
>> drops mcrypt because it hasn't been updated in over 10 years.
>>
>> So I am in the process now of converting the mcrypt code to use the
>> openssl library.  I will let everyone know when we have Horde running
>> with php7.2-fpm (or fail to get it working).
>>
> 
> We are running custom apps + kronolith on horde base in php7 (SLES,
> openSUSE) using several libraries (Horde_Date, Horde_Rdo,
> Horde_Controller, Horde_View, Horde_Ldap ... ) heavily. I haven't
> experienced any issues with this platform.
> 
> However, I noticed some changes in how Horde_Rdo handles input of
> incomplete data arrays for creating new database rows / Entities with
> implicit, backend-driven defaults for missing keys.
> 
> In my older php 5.3 platform, this just worked. In my newer php 7
> platform, this breaks and I handle missing fields overloading
> Horde_Rdo_Mapper's respective functions, manipulating the input array as
> a workaround. This may be entirely unrelated to PHP as we also changed
> from mysql to mariadb.
> 
> @Diana: Do you happen to have a reproducer/example of the overloaded
> function and the underlying data model? Replace $customername with foo
> in case it's too revealing.
> 
> I haven't had time to reproduce this properly and dive into the issue,
> just a heads-up. It should not harm your standard apps using Rdo
> (content tagger mostly?)
> 
> 
> Regards
> 
> 
> Ralf
> 

Hello @all,

I can provide at least some errors and screenshots I got the last time I
worked with Horde5 and PHP7. At first I got a lot of warnings (check the
screenshot: https://share.b1-systems.de/index.php/s/txeoglkixyqHbC9),
but most of them weren't critical. Please note that I had to blacken the
parts relating to our customer but the errors still should be conclusive.

The RDO problem we encountered showed itself as following:

<-- snip

A fatal error has occurred
SQLSTATE[23000]: Integrity constraint violation: 1048 Colum
'certificate_renewal' cannot be null

-->

But on the contrary the database had a default value for this column:
| Field               | Type    | Null | Key | Default | Extra   |
...
| certificate_renewal | int(11) | NO   |     | 0       |         |

...

The real issue laid within the definition of the Mapper:

<-- snip

    public function create(array $fields)
    {
        if (empty($fields['nolicense_count'])) {
            $fields['nolicense_count'] =
$GLOBALS['conf']['licenses']['max_no_license'];
        }

        ...

        return  parent::create($fields);
     }

-->

We had to add the missing default values there to get the RDO Mapper
functions working again. We don't have these problems with PHP5, so it
might be that PHP7 is more strict concerning some dependencies.

Regards,

Diana

-- 
Diana Hille, Dipl.-Inf.
Linux Consultant & Developer
Tel.: +49-151-61995500
Mail: hille at b1-systems.de

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537


More information about the horde mailing list