Can find mcrypt in PHP 7

I’m trying to upgrade to XIBO 1.8.10 from 1.7.x … as always the documentation is good but when I get to the actual install the WELCOME TO THE XIBO INSTALLATION page shows a number of errors.

This is a manual install on Windows Server 2012 R2 running IIS 8.

I could fix all of the errors except for the MCRYPT EXTENSION.

Can’t move forward without fixing it … can’t find a way to install it.

In my previous installation I had the extension=php_mcrypt commented out in the php.ini.

Does XIBO still really need this? How can I get around the issue in a manual install.

Any help will be appreciated.

Can you confirm which version of PHP you are using?

Mcrypt has been removed from PHP as of version 7.2. You may need to use version 7.1 or earlier if you wish to install it.

An alternative solution would be to use Docker, which you can download already set up for you. I have included a link to the manual should you wish to look into it further.

https://xibo.org.uk/manual/en/install_docker_win10_64bit.html

Many Thanks.

Thanks for the reply.

I understand the Mcrypt was removed from PHP as of version 7.2.

Why does the XIBO customer install require it? Anyway to bypass that requirement in the installation?

Unfortunately, Docker is not an alternative in the environment while I’m working.

Thanks again.

The CMS uses mcrypt, so it’s a requirement to have it available in order to use Xibo.

If the version of PHP you’re using doesn’t provide it, then you’ll either need to add it, or downgrade PHP to a version that supports it.

Hi Alex,

I understand that Xibo CMS uses mcrypt BUT isn’t it already overdue to switch over to for example openssl? Is it on the roadmap at all, or not? If so, when -roughly- can it be expected to find it’s way into an release?

mcrypt hasn’t been maintained for ages for what I can read all over the web and pretty much everyone mentions openssl as the most logical successor.

Like sernell I’m unfortunately not in the position to use Docker, so I need to find a workable solution. It looks like PHP7.0 still comes with mcrypt and that it was removed from PHP from 7.1 onwards. Anyway, I also have an issue getting it to work with PHP7.0 at the moment.

There was an issue logged and the requirement removed for 1.8.12.

Xibo itself doesn’t use it (and hasn’t for some time), but requires it to check passwords hashed in older versions of Xibo prior to migrating them to the new hashing algorithm.

Hi Alex, thanks for the feedback, good to see this is already being tackled. I’ve starred the github project for future troubleshoot searches :slight_smile:

It’s going to be 1.8.12 in that case as I still see the mcrypt check in the lib/Helper/Environment.php file of 1.8.11, which is the version I’m trying to install the last couple of days.

I’ll comment out the lines in the 1.8.11 file for now and give it another try.

Cheers,

Steven

It may work with that commented out, but the fix we’ve gone for is to use a pure php polyfill so you may have issues unless you include that too and regenerate the vendor folder accordingly.

Hi Alex, it took some re-installs, mostly because me being silly by not following every step in the manual installation guide written by @michael (XIBO step by step Installation IIS 8.5 on WINDOWS SERVER 2012), BUT by changing line 92-99 of lib/Helper/Environment.php from:

/**
     * Check PHP has the Mcrypt functionality installed
     * @return bool
     */
    public static function checkMcrypt()
    {
        return extension_loaded("mcrypt");
    }

into:

/**
     * Check PHP has the Mcrypt functionality installed
     * @return bool
     */
    public static function checkMcrypt()
    {
        return true;       /* was originally:   return extension_loaded("mcrypt"); */
    }

I managed to get through the installer and now seem to have a fully working, manually installed, Xibo CMS 1.8.11 running on Windows Server 2012 R2 with IIS 8.5 #yeah!

Looking forward to the 1.18.12 release though in which the mcrypt dependency will be removed so I can forget about this workaround :wink:

Thanks for your support / hint to get around the problem.

You’re welcome.

I don’t believe that guide covers setting up XTR. You’ll need to do that too to have a working CMS. It’s basically a case of setting up a scheuduled task in the Windows task scheduler.