Travis Build Failing (Ruby)
defuse opened this issue · comments
https://travis-ci.org/defuse/password-hashing/jobs/60788535
PHP<->Ruby Compatibility
---------------------------------------------
PHP hash validating in Ruby: pass
PHP hash validating bad password in Ruby: pass
Could not open input file: ./tests/phpVerify.php
Ruby hash validating in PHP: FAIL
FAIL.
Might have reproduced this locally:
PHP<->Ruby Compatibility
---------------------------------------------
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mysql.so' - /usr/lib/php/modules/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/openssl.so' - /usr/lib/php/modules/openssl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/phar.so' - /usr/lib/php/modules/phar.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/libsodium.so' - libsodium.so.13: cannot open shared object file: No such file or directory in Unknown on line 0
/home/firexware/Data-1/Documents/FireXware/Programming/gits/password-hashing/PasswordHash.rb:60:in `verifyPassword': Fields are missing from the password hash. (InvalidHashError)
from tests/testRubyPhpCompatibility.rb:35:in `testPHPHash'
from tests/testRubyPhpCompatibility.rb:53:in `<main>'
FAIL.
The standard out it's getting is:
\nWarning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mysql.so' - /usr/lib/php/modules/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0\n\nWarning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/openssl.so' - /usr/lib/php/modules/openssl.so: cannot open shared object file: No such file or directory in Unknown on line 0\n\nWarning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/phar.so' - /usr/lib/php/modules/phar.so: cannot open shared object file: No such file or directory in Unknown on line 0\n\nWarning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/libsodium.so' - libsodium.so.13: cannot open shared object file: No such file or directory in Unknown on line 0\nDefuseDABomb! sha1:32000:18:wsZEnsWWgnkFIRrO1JS05CGIdx6Ao2mV:bjYGQxa/DWp52qL4Kguut7/2\n"
Even redirecting PHP stderr to /dev/null. WTF. Does this mean PHP is totally useless for building unix command-line utitlities since it can arbitrarily pass shit to stdout? Yes it does:
[firexware@firexware-pc password-hashing]$ php /tmp/test.php 2>/dev/null
Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mysql.so' - /usr/lib/php/modules/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/openssl.so' - /usr/lib/php/modules/openssl.so: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/phar.so' - /usr/lib/php/modules/phar.so: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/libsodium.so' - libsodium.so.13: cannot open shared object file: No such file or directory in Unknown on line 0
Oh, this issue was originally because I forgot to commit ./tests/phpVerify.php
. That's fixed. But now this other problem...
Obviously the problem is with my PHP on my system, but god damn, there should be a command-line switch to turn those off or something.
Okay I just fixed PHP on my system. Not going to add some crazy hack to grep away the "Warning: PHP Startup" lines or anything like that, since I can't possibly predict all the ways PHP could decide to spit out error messages.