Giter VIP home page Giter VIP logo

Comments (9)

ircmaxell avatar ircmaxell commented on September 17, 2024

Can you provide the output of php -v run from the command line (the complete version information).

Also, can you turn on all error reporting (if you haven't done so already) by doing error_reporting(-1), and then checking if any errors are thrown?

Thanks

Anthony

from password_compat.

bretrzaun avatar bretrzaun commented on September 17, 2024

PHP version output:
PHP 5.3.8-ZS5.5.0 (cli) (built: Aug 23 2011 09:15:05)
Copyright (coffee) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (coffee) 1998-2011 Zend Technologies
   with Zend Extension Manager v5.1, Copyright (coffee) 2003-2010, by Zend Technologies
   - with Zend Data Cache v4.0, Copyright (coffee) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]
   - with Zend Download Server v1.5.0, Copyright (coffee) 1998-2010 Zend Technologies Ltd., by Zend Technologies [loaded] [licensed] [disabled]
   - with Zend Job Queue v4.0, Copyright (coffee) 2004-2010, by Zend Technologies [loaded] [not licensed] [disabled]
   - with Zend Session Clustering v4.0, Copyright (coffee) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]
   - with Zend Utils v1.0, Copyright (coffee) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]
   - with Zend Optimizer+ v4.1, Copyright (coffee) 1999-2010, by Zend Technologies [loaded] [licensed] [disabled]
   - with Zend Code Tracing v1.0, Copyright (coffee) 2009-2010, by Zend Technologies [loaded] [not licensed] [disabled]
   - with Zend Monitor v4.1, Copyright (coffee) 1999-2010, by Zend Technologies [loaded] [licensed] [disabled]
   - with Zend Debugger v5.3, Copyright (coffee) 1999-2010, by Zend Technologies [loaded] [licensed] [enabled]
   - with Zend Page Cache v4.0, Copyright (coffee) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]

Error reporting shows no messages at all.

from password_compat.

ircmaxell avatar ircmaxell commented on September 17, 2024

Can you run version-test.php from your cli?

> php version-test.php

What does it output?

Additionally, if you manually run the following via a PHP file, can you post the results?

$hash = '$2y$04$usesomesillystringfore7hnbRJHxXVLeakoG8K30oukPsA.ztMG';
$test = crypt("password", $hash);
var_dump($hash);

from password_compat.

bretrzaun avatar bretrzaun commented on September 17, 2024

The output of version-test.php is:

Test for functionality of compat library: Fail

Your code example gave us:

string(60) "$2y$04$usesomesillystringfore7hnbRJHxXVLeakoG8K30oukPsA.ztMG"

from password_compat.

ircmaxell avatar ircmaxell commented on September 17, 2024

That's really weird. Can you try editing line 5 of version-test.php from:

$pass = $test == $hash;

To

$pass = $test === $hash;

I'm not sure what's happening

from password_compat.

simoncoggins avatar simoncoggins commented on September 17, 2024

@ircmaxell You asked him to var_dump($hash), didn't you mean $test?

from password_compat.

erdemece avatar erdemece commented on September 17, 2024

same thing is happening to me as well.

Test for functionality of compat library: Fail

from password_compat.

danez avatar danez commented on September 17, 2024

Can you try this snippet?

$hash = '$2y$04$usesomesillystringfore7hnbRJHxXVLeakoG8K30oukPsA.ztMG';
$test = crypt("password", $hash);
var_dump($test);

from password_compat.

sarciszewski avatar sarciszewski commented on September 17, 2024

A slightly more meaningful test, since it prints both $hash and $test:

$hash = '$2y$04$usesomesillystringfore7hnbRJHxXVLeakoG8K30oukPsA.ztMG';
$test = crypt("password", $hash);
var_dump(array($hash, $test));

from password_compat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.