Want to subscribe to topics you're interested in?
Become a Member

Beta Branch Update PHP 7.2. add argon2 password & libsodium support

Discussion in 'Centmin Mod Github Commits' started by eva2000, Nov 14, 2017.

  1. eva2000

    eva2000 Administrator Staff Member

    55,396
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    10:03 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  2. eva2000

    eva2000 Administrator Staff Member

    55,396
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    10:03 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Code (Text):
    php -v
    PHP 7.2.0RC6 (cli) (built: Nov 14 2017 08:57:15) ( NTS )
    Copyright (c) 1997-2017 The PHP Group
    Zend Engine v3.2.0-dev, Copyright (c) 1998-2017 Zend Technologies
        with Zend OPcache v7.2.0RC6, Copyright (c) 1999-2017, by Zend Technologies
    

    php libsodium extension
    Code (Text):
    php --ri sodium
    
    sodium
    
    sodium support => enabled
    libsodium headers version => 1.0.15
    libsodium library version => 1.0.15
    

    libsodium extension load = sodium
    Code (Text):
    php -m
    [PHP Modules]
    bcmath
    bz2
    calendar
    Core
    ctype
    curl
    date
    dom
    enchant
    exif
    filter
    ftp
    gd
    geoip
    gettext
    gmp
    hash
    iconv
    igbinary
    imagick
    imap
    intl
    json
    ldap
    libxml
    mailparse
    mbstring
    memcache
    memcached
    mysqli
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    pdo_sqlite
    Phar
    posix
    pspell
    readline
    redis
    Reflection
    session
    shmop
    SimpleXML
    snmp
    soap
    sockets
    sodium
    SPL
    sqlite3
    standard
    sysvmsg
    sysvsem
    sysvshm
    tidy
    tokenizer
    xml
    xmlreader
    xmlrpc
    xmlwriter
    xsl
    Zend OPcache
    zip
    zlib
    
    [Zend Modules]
    Zend OPcache
    

    php-config
    Code (Text):
    php-config
    Usage: /usr/local/bin/php-config [OPTION]
    Options:
      --prefix            [/usr/local]
      --includes          [-I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib]
      --ldflags           [ -L/usr/local/lib64]
      --libs              [-lcrypt  -lc-client  -lzip -lzip -lz -lexslt -ltidy -largon2 -lresolv -lcrypt -lsodium -ledit -lncurses -laspell -lpspell -lrt -lldap -llber -lstdc++ -lcrypt -lpam -lgmp -lX11 -lXpm -lpng -lz -ljpeg -lwebp -lenchant -lbz2 -lz -lrt -lm -ldl -lnsl  -lxml2 -lz -llzma -lm -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lcurl -lxml2 -lz -llzma -lm -ldl -lssl -lcrypto -lfreetype -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -ldl -lm -licui18n -licuuc -licudata -ldl -lm -licuio -lxml2 -lz -llzma -lm -ldl -lnetsnmp -lssl -lssl -lcrypto -lm -lxml2 -lz -llzma -lm -ldl -lcrypt -largon2 -largon2 -lxml2 -lz -llzma -lm -ldl -lxml2 -lz -llzma -lm -ldl -lxml2 -lz -llzma -lm -ldl -lxml2 -lz -llzma -lm -ldl -lxslt -lxml2 -lm -lssl -lcrypto -lcrypt ]
      --extension-dir     [/usr/local/lib/php/extensions/no-debug-non-zts-20170718]
      --include-dir       [/usr/local/include/php]
      --man-dir           [/usr/local/php/man]
      --php-binary        [/usr/local/bin/php]
      --php-sapis         [ cli embed fpm phpdbg cgi]
      --configure-options [--enable-fpm --enable-opcache --enable-intl --enable-pcntl --with-mcrypt --with-snmp --enable-embed=shared --with-mhash --with-zlib --with-gettext --enable-exif --enable-zip --with-libzip --with-bz2 --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-shmop --with-pear --enable-mbstring --with-openssl --with-mysql=mysqlnd --with-libdir=lib64 --with-mysqli=mysqlnd --with-mysql-sock=/var/lib/mysql/mysql.sock --with-curl --with-gd --with-xmlrpc --enable-bcmath --enable-calendar --enable-ftp --enable-gd-native-ttf --with-freetype-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr --with-webp-dir=/usr --with-t1lib=/usr --enable-pdo --with-pdo-sqlite --with-pdo-mysql=mysqlnd --enable-inline-optimization --with-imap --with-imap-ssl --with-kerberos --with-readline --with-libedit --with-gmp --with-pspell --with-tidy --with-enchant --with-fpm-user=nginx --with-fpm-group=nginx --disable-fileinfo --with-ldap --with-ldap-sasl --enable-huge-code-pages --with-password-argon2 --with-sodium --with-config-file-scan-dir=/etc/centminmod/php.d --with-xsl]
      --version           [7.2.0RC6]
      --vernum            [70200]
    

    excerpt for php 7.2.0 rc6 configuration output
    Code (Text):
    checking for Argon2 support... yes
    checking for Argon2 library... found in /usr
    checking for argon2_hash in -largon2... yes
    checking for argon2id_hash_raw in -largon2... yes
    

    PHP 7.2.0 switches to libzip 1.3.0 provided by Remi yum repo instead of system yum repo as CentOS 6 defaults to libzip 0.9 and CentOS 7 defaults to libzip 0.10 while PHP 7.2 requires libzip 0.11+ or higher.
    excerpt from php 7.2.0 rc6 configuration output
    Code (Text):
    checking libzip... yes
    checking for the location of zlib... /usr
    checking for pkg-config... (cached) /bin/pkg-config
    checking for libzip... from pkgconfig: version 1.3.0 found in /usr/lib64
    checking for zip_open in -lzip... yes
    checking for zip_file_set_encryption in -lzip... yes
    

    if you try using system libzip, you get during compile failed run with
    Code (Text):
    checking for libzip... configure: error: system libzip must be upgraded to version >= 0.11
    

    php 7.2.0 rc6 installed zip extension output (when you view phpinfo same output)
    Code (Text):
    php --ri zip
    
    zip
    
    Zip => enabled
    Zip version => 1.15.1
    Libzip version => 1.3.0
    

    confirming compiled php 7.2.0 rc6 is using Remi's libzip 1.3.0 version by checking libary used in binary
    Code (Text):
    ldd $(which php) | grep zip
            libzip.so.5 => /lib64/libzip.so.5 (0x00007f5e7f34d000)
    

    Code (Text):
    yum -q provides /lib64/libzip.so.5
    libzip5-1.3.0-1.el7.remi.x86_64 : C library for reading, creating, and modifying zip archives
    Repo        : @remi
    Matched from:
    Filename    : /lib64/libzip.so.5
    
     
  3. eva2000

    eva2000 Administrator Staff Member

    55,396
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    10:03 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    updated routine Beta Branch - update PHP 7.2 libzip, libsodium & argon2 route :)

    Code (Text):
    checking for Argon2 support... yes
    checking for Argon2 library... found in /usr/local
    checking for argon2_hash in -largon2... yes
    checking for argon2id_hash_raw in -largon2... yes
    

    Code (Text):
    php --ri sodium
    sodium
    
    sodium support => enabled
    libsodium headers version => 1.0.16
    libsodium library version => 1.0.16

    Code (Text):
    php --ri zip
    zip
    
    Zip => enabled
    Zip version => 1.15.2
    Libzip headers version => 1.5.0
    Libzip library version => 1.5.0
    

    Code (Text):
    ldd $(which php) | grep zip
            libzip.so.5 => /usr/local/lib64/libzip.so.5 (0x00007f586526e000)