Mcrypt Is No Longer Maintained For PHP 7.2 But Receive Error After Installing Sodium

I’m installing OwnCloud 10.0.8 on Ubuntu 18.04 server and PHP 7.2. Mcrypt is listed as an optional prerequisite but Mcrypt is no longer maintained and has been replaced by Sodium. After installing Sodium (1.0.6-1build3) I receive this error:
owncloud:~$ php -m|grep -i sodium
PHP Fatal error: sodium_init() in Unknown on line 0
libsodium
sodium

I’m not really sure what is causing this. I searched the php.ini file in /etc/php/7.2/cli but could not find anything involving libsodium or sodium.

Hi,

php 7.2 is not yet officially supported by ownCloud. Please install php 7.1.

Hi Dmitry,

The online guide for the “Manual Installation on Linux” section says this:

PHP Version
PHP >= 5.6 (ideally 7.0 or above)

I thought that implied anything above PHP 7.0 was acceptable?

Yeah. This has clearly not been formulated well enough. You are correct.

PHP 7.0 and 7.1 works. 7.2 not yet.

I will change the docs. Thanks for noticing

Sure glad I could help! I will try this again with PHP 7.1.

owncloud:~$ php -m|grep -i sodium
PHP Fatal error: sodium_init() in Unknown on line 0
libsodium
sodium

That is an issue in your php environment - for some reason it is not properly installed.
Currently unrelated to ownCloud

@dmitry recommendation for php7.1 is valid - currently php 7.2 is in technical preview and you might encounter issues.

1 Like

I understand. Mcrypt is listed as an optional extension in the ownCloud manual so I guess it’s not a big deal if I cannot install it. It would be great to be able to use PHP 7.2 as it’s natively available in the Ubuntu 18.04 repositories. In order to install PHP 7.1 on Ubuntu 18.04 I must add a third party repository (which I’m not a fan of). Have you encountered any issues with PHP 7.2 during your technical preview?

Ok, some new ideas to this topic. What to do with mcrypt and php 7.2.