Syspass: Support for PHP version > 7.0

Created on 21 Dec 2017  路  17Comments  路  Source: nuxsmin/sysPass

I have upgraded my PHP host to 7.2 and noticed syspass is still requiring versions <= 7.0 (syspass is on latest master)

kinquestion triagimplemented

All 17 comments

That's right, and PHP 7.1 version will be supported in next release. I'm committed to support the latest PHP version, but be aware that many dependencies require some specific version besides the users (most of them) who are running older versions too. There needs to be a compromise between up to date and legacy.

Currently, there are many alternatives with containerization solutions like docker, so it will bring more flexibility to run recent versions without compromising the system.

Kind regards

Hi
Just putting forward my interest in this. I would love to use this product, but it needs to run on PHP 7.2 for me to be able to use it.
I am waiting with bated breath for a release that supports PHP 7.2. :)

Mark

Hi
Same for me. Ubuntu 18.04 will be released this month. The default php version on the system is php 7.2
Would be nice if syspass works on the system.
Also as a note, in php 7.2 mod_mcrypt was removed (deprecated in 7.1), I found a workaround on 18.04 to install it, but it would be better if the replacement is used.

The same for me, I am runing debian with php7.1 and not working.

Same for me!

Running: PHP 7.1.16-1+0~20180405085551.16+jessie~1.gbp4937aa.

Just tested with the latest master, no support yet!

Regards RoRu69

I'm running syspass on PHP version 7.0.7and it works fine. Just make sure to install package "php7*" (all php7 packages) before installing syspass.

Hello,

we are running syspass on PHP 7.1.17. I had to change the condition that checks the php version and fix a problem with account color generation in the search list but otherwise syspass is working fine. I haven't experienced any incompatibility so far.

Best regards,

David Fabian

@dvdfabian in which file did you change the condition?

I have

    public static function checkPhpVersion()
    {
        return version_compare(PHP_VERSION, '5.6.0', '>=') && version_compare(PHP_VERSION, '7.2.0') === -1;
    }

in inc/SP/Util/Checks.class.php.

Best regards,

David Fabian

I am using version sysPass-2.1.15.17101701. It was the latest stable version at the time of installation.

Best regards,

David Fabian

I'd be interested in this also. I currently need to be upgrading another piece of software thats minimum requirement is PHP 7.1.21. Will this be supported in 3.0? Any timescale for that yet?

@ReeceYoung98 sure, v3 will support 7.1 (it does now surely but testing and some tweaks need to be done) and hopefully 7.2 too, but I need to take some time to finish the new features implementation and testing. I'll work hard to get it ready by the end of June.

@dvdfabian I changed the Condition wich checks the PHP version successfully, but now I get an Server Error when I go to the list of passwords. This might be the problem with account color generation you encountered. Could you post what you changed there?

Hello @timtim8461 ,

try to add

$accountColor = array();

above the comment at
https://github.com/nuxsmin/sysPass/blob/65b492995674e418721d52c8b4383ec144bdff91/inc/SP/Account/AccountSearch.class.php#L660

Best regards,

David Fabian

Perfect that fixed it for me also! Tank you @dvdfabian!

Use 2.1.16 on Ubuntu 18.04.
Seems OK for now.

@dvdfabian , I resolve the accountColor in other way.
Because putting the new instance in the AccountSearch.class.php :

    private function pickAccountColor($id)
    {
        $accountColor = Session::getAccountColor();

        if (!is_array($accountColor)
            || !isset($accountColor, $accountColor[$id])
        ) {
            // Se asigna el color de forma aleatoria a cada id
            $color = array_rand(self::$colors);

            $accountColor[$id] = '#' . self::$colors[$color];
            Session::setAccountColor($accountColor);
        }

        return $accountColor[$id];
    }

The first time it is call, $accountColor is null, then it is necessary to build the array.
The second time, with different $id, $accountColor is an array but the value is not set in the array. Then, you reinitialize the array.

I modified the file inc/SP/Core/Session.class.php

    public static function getAccountColor()
    {
        $tmpAccountColor = self::getSessionKey('accountcolor');
        if (!is_array($tmpAccountColor)
        ) {
            $tmpAccountColor = array();
            self::setAccountColor($tmpAccountColor);
        }
        return $tmpAccountColor;
        // return self::getSessionKey('accountcolor');
    }

Hello,

sysPass v3-beta is now compatible with PHP >= 7.0. You can test these PHP flavours on:

Regards

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MarcSamD picture MarcSamD  路  4Comments

matejzero picture matejzero  路  5Comments

NOTORIOUSVR picture NOTORIOUSVR  路  3Comments

LordSchnaps picture LordSchnaps  路  4Comments

onnwe934nfajen picture onnwe934nfajen  路  6Comments