Get the most out of your Centmin Mod LEMP stack
Become a Member

[Solved] Argon2i Support in PHP 7.2.3 (Beta Build)

Discussion in 'Bug Reports' started by noopy, Mar 17, 2018.

  1. noopy

    noopy New Member

    3
    2
    3
    Mar 17, 2018
    Ratings:
    +2
    Local Time:
    9:28 AM
    Hello,
    • CentOS Version: CentOS 7 64 bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.13.9
    • PHP Version Installed: 7.2.3
    • MariaDB MySQL Version Installed: 10.1.31
    • When was last time updated Centmin Mod code base ? : newest (beta) build/recent.
    • Persistent Config: just letsencrypt
    Although, I am building Centminmod with PHP v7.2+ it doesn't seem to want to build argon2i support. I thought PHP 7.2 by default comes compiled with argon2i? How can I go about building it with such support?

    Thank you so much for your time/effort. I appreciate it!
     
  2. eva2000

    eva2000 Administrator Staff Member

    33,668
    7,456
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,461
    Local Time:
    11:28 PM
    Nginx 1.13.x
    MariaDB 5.5
    Hi yes 123.09beta01's PHP 7.2 intends to have argon2 support just that it's still work in progress as it's failing to compile properly for me so isn't installed right now :(

    Might have to revisit it as it's been a few months since I last tried was back in Nov 2017 and seems issue was with required dependency for libzip failing php 7.2.0 ga stable errors 30/11/17

    edit: just tried again still tripping up and failing to compile
    Code (Text):
    checking libzip... yes
    checking for the location of zlib... /usr/local/zlib-cf
    checking for pkg-config... (cached) /bin/pkg-config
    checking for libzip... from pkgconfig: version 1.5.0 found in /usr/lib64
    checking for zip_open in -lzip... yes
    checking for zip_file_set_encryption in -lzip... yes
    checking for zip_libzip_version in -lzip... yes
    checking stdbool.h usability... yes
    checking stdbool.h presence... yes
    checking for stdbool.h... yes
    checking fts.h usability... yes
    checking fts.h presence... yes
    checking for fts.h... yes
    checking for int8_t... (cached) yes
    checking for int16_t... (cached) yes
    checking for int32_t... (cached) yes
    checking for int64_t... (cached) yes
    checking for uint8_t... (cached) yes
    checking for uint16_t... (cached) yes
    checking for uint32_t... (cached) yes
    checking for uint64_t... (cached) yes
    checking for ssize_t... yes
    checking size of short... (cached) 2
    checking size of int... (cached) 4
    checking size of long... (cached) 8
    checking size of long long... (cached) 8
    checking size of off_t... 0
    configure: error: off_t undefined; check your library configuration
    

    will have to investigate but looks like i am not the only person with the issue PHP :: Bug #73943 :: Problem when configuring with zip support

     
    • Like Like x 1
  3. eva2000

    eva2000 Administrator Staff Member

    33,668
    7,456
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,461
    Local Time:
    11:28 PM
    Nginx 1.13.x
    MariaDB 5.5
    ah think I found the solution to getting PHP 7.2 with libzip + libsodium + argon2 to compile. Testing it out right now :D

    Updated 123.09beta01 with fixed 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)
    
     
    Last edited: Mar 17, 2018
    • Like Like x 2
    • Winner Winner x 1
  4. eva2000

    eva2000 Administrator Staff Member

    33,668
    7,456
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,461
    Local Time:
    11:28 PM
    Nginx 1.13.x
    MariaDB 5.5
    FYI, PHP 7.2 has support for argon2 but it's disabled by default due to dependencies not being available in distro repositories so they leave it to end users like Centmin Mod (me) to actually enable support for libsodium and argon2 which I have done now in 123.09beta01 :D
     
    • Like Like x 1
  5. noopy

    noopy New Member

    3
    2
    3
    Mar 17, 2018
    Ratings:
    +2
    Local Time:
    9:28 AM
    Awesome, thank you - but still running into an issue. For some reason, PHP (7.2.0/7.2.2/7.2.3) doesn't want to be built with argon2(i).

    Code:
      --libs              [-lcrypt  -lc-client  -lz -lexslt -ltidy -lresolv -lcrypt -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 -lm -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lcurl -lxml2 -lz -lm -ldl -lssl -lcrypto -lfreetype -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -ldl -lm -licui18n -licuuc -licudata -ldl -lm -licuio -lxml2 -lz -lm -ldl -lnetsnmp -lssl -lssl -lcrypto -lm -lxml2 -lz -lm -ldl -lcrypt -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl-lxml2 -lz -lm -ldl -lxslt -lxml2 -lz -ldl -lm -lssl -lcrypto -lcrypt ]
    Using beta build 123.09beta01. And added PHP_LIBZIP='y' to custom_config file. Not sure what the problem is.

    Again, thank you for your help!
     
  6. eva2000

    eva2000 Administrator Staff Member

    33,668
    7,456
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,461
    Local Time:
    11:28 PM
    Nginx 1.13.x
    MariaDB 5.5
    Did you update 123.09beta01 code on your server first ? Running centmin.sh menu option 23 submenu option 2 and exiting centmin.sh and re-running centmin.sh or running cmupdate command

    Code (Text):
    cmupdate
    No local changes to save
    Updating e013b91..79da2ce
    Fast-forward
     centmin.sh                |  7 +++++--
     example/custom_config.inc |  6 ++++--
     inc/downloadlinks.inc     |  5 ++++-
     inc/libzip.inc            | 25 +++++++++++++++++++++++++
     inc/php_configure.inc     | 37 +++++++++++++++++++++++++++++++------
     5 files changed, 69 insertions(+), 11 deletions(-)
     create mode 100644 inc/libzip.inc
    


    then run centmin.sh menu option 5 to recompile PHP 7.2.3

    Upgrading Centmin Mod Code to Latest Version



    Getting Started Guide step 19 outlines also how to keep Centmin Mod code updated or how to switch version branches or you can run cmupdate command that was recently added.

    Centmin Mod LEMP stack's script code is constantly updated for improvements, bug fixes and security fixes so keeping the Centmin Mod code up to date is important. With Centmin Mod 1.2.3-eva2000.08) (123.08stable) and higher releases, a newly added centmin.sh menu option 23 allows much easier code updates and version branch swicthing via Git backed environment you can setup. For full details read the following links:
     
..