Comments (9)
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.
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.
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.
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.
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.
@ircmaxell You asked him to var_dump($hash), didn't you mean $test?
from password_compat.
same thing is happening to me as well.
Test for functionality of compat library: Fail
from password_compat.
Can you try this snippet?
$hash = '$2y$04$usesomesillystringfore7hnbRJHxXVLeakoG8K30oukPsA.ztMG';
$test = crypt("password", $hash);
var_dump($test);
from password_compat.
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)
- password_verify fails for hashes from crypt() HOT 3
- mysqli_real_escape_string
- PASSWORD_ARGON2I Algo Support HOT 1
- Password verify issues HOT 1
- php7 Compatibility problem HOT 5
- PHPCompatibility ruleset for password_compat
- Trouble with PHP 5.6 & Password Verify HOT 1
- A HOT 1
- A
- Function not outputting the same hash as built-in function HOT 8
- Bcrypt issue HOT 1
- function_exists('PasswordCompat\\binary\\_strlen') needed? HOT 4
- password_hash("foo") returning false on 5.3.2-1ubuntu4.30 HOT 7
- Cannot verify the password after hashing HOT 1
- Suggestion: use *.phpt tests from php-src to improve compatibility
- Problem with verifiying the hashed password HOT 3
- Using the project on a newer version of PHP HOT 2
- This Repo HOT 7
- use password_compact in codeigniter HOT 2
- This lib on php 5.5 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from password_compat.