php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #76655 libsodium seems not present, "no installation needed" not true
Submitted: 2018-07-23 07:44 UTC Modified: 2018-07-23 10:41 UTC
From: it-solutions at schultz dot ch Assigned: cmb (profile)
Status: Closed Package: *Encryption and hash functions
PHP Version: 7.2.8 OS: Linux / Windows
Private report: No CVE-ID: None
 [2018-07-23 07:44 UTC] it-solutions at schultz dot ch
Description:
------------
Although PHP announced that with PHP 7.2 libsodium will be part of the PHP core and available without any further action (see https://secure.php.net/manual/en/sodium.installation.php), even in the latest PHP 7.2.8 it seems not to be accessible.

There are numerous reports on this issue on the web, some suggesting to install older libs (7.1) instead.

I suggest the documentation clarifies, under which circumstances this new (and eagerly awaited) feature is available "out of the box" (or what steps need to be taken to do so).




Test script:
---------------
<?php 
echo (SODIUM_LIBRARY_VERSION);
?>

Expected result:
----------------
shows library version number (which is stored in the named constant, see https://secure.php.net/manual/en/sodium.constants.php )

Actual result:
--------------
shows the literal "SODIUM_LIBRARY_VERSION", so the constant is actually not existing

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-07-23 08:16 UTC] requinix@php.net
-Summary: libsodium seems not present +Summary: libsodium seems not present, "no installation needed" not true
 [2018-07-23 08:16 UTC] requinix@php.net
Unfortunately "core" can mean one of two things depending on who says it and in what context: (a) it's bundled with the PHP source and available as an extension, or (b) it's bundled with the source and baked-into PHP automatically. The former is more about the fact that it's officially maintained by the PHP "core devs", as opposed to being something third-party or in PECL, and the latter tends to mean the extension acts as a dependency for important behavior (eg, ext/tokenizer).

Thing is, this is all still subject to how distributors want to deal with it. Particularly Linux, which very often separates "core" stuff into optional packages to install. The Windows download is about as close as it gets to some sort of "default" PHP installation.

And with the Windows download, sodium is an extension. So it's "core" in the first sense.
On Windows you can get it by enabling that extension, and on Linux you'll probably have to install some package.
 [2018-07-23 10:41 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=345378
Log: Fix #76655: libsodium seems not present, &quot;no installation needed&quot; not true
 [2018-07-23 10:41 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2018-07-23 10:41 UTC] cmb@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2020-02-07 06:05 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=7edfdafc14571629a807106494e0b2f21bd4e467
Log: Fix #76655: libsodium seems not present, &quot;no installation needed&quot; not true
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 09:01:29 2024 UTC