| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2007-01-30 23:48 UTC] nick at nickstallman dot net
  [2008-01-07 05:49 UTC] hurclee at gmail dot com
  [2008-01-22 16:03 UTC] gregkiyomi at digitaljunkies dot ca
  [2008-07-17 06:12 UTC] tony at daylessday dot org
  [2015-10-26 20:07 UTC] rmf@php.net
 
-Status: Closed
+Status: Assigned
  [2015-10-26 20:07 UTC] rmf@php.net
 
-Status:      Open
+Status:      Assigned
-Assigned To:
+Assigned To: rmf
  [2015-10-26 20:10 UTC] rmf@php.net
  [2017-10-24 06:17 UTC] kalle@php.net
 
-Status:      Assigned
+Status:      Open
-Assigned To: rmf
+Assigned To:
  [2017-10-24 06:18 UTC] kalle@php.net
 
-Status: Open
+Status: Suspended
  [2017-10-24 06:18 UTC] kalle@php.net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Mon Nov 03 23:00:01 2025 UTC | 
Description: ------------ Hi. This is imacat from Taiwan. I have reported a problem on static build before. I saw you file it as #5763. I found that the PHP crack extension does not work on x86_64. It returns "magic mismatch" when opening the dictionary. The dictionary is fine, since pam_crack works with that dictionary. I have tested this on my 2 x86_64 machines: The first one is Debian Sarge 3.1r4 AMD64, kernel 2.6.16.29, GCC 3.4.4, glibc 2.3.2, PHP 5.2.0. The second is Debian Etch AMD64 d-i 2006-12-25, kernel 2.6.16.29, GCC 4.1.2, glibc 2.3.6, PHP 5.2.0. The same code works fine on my i386/i686 machines. Reproduce code: --------------- #! /usr/bin/php <?php $dict = "/usr/share/dict/pw_dict"; $passwd1 = "analysis"; $passwd2 = "Dysk9queheoj"; echo "* crack_opendict(\"$dict\"):\n "; var_dump(crack_opendict($dict)); echo "* crack_check(\"$passwd1\"):\n "; var_dump(crack_check($passwd1)); echo "* crack_getlastmessage():\n "; var_dump(crack_getlastmessage()); echo "* crack_check(\"$passwd2\"):\n "; var_dump(crack_check($passwd2)); echo "* crack_getlastmessage():\n "; var_dump(crack_getlastmessage()); ?> Expected result: ---------------- On my i386/i686 machines: imacat@leaf ~ % /tmp/test.php * crack_opendict("/usr/share/dict/pw_dict"): resource(4) of type (crack dictionary) * crack_check("analysis"): bool(false) * crack_getlastmessage(): string(32) "it is based on a dictionary word" * crack_check("Dysk9queheoj"): bool(true) * crack_getlastmessage(): string(15) "strong password" imacat@leaf ~ % Actual result: -------------- On my x86_64 machines: imacat@atlas ~ % /tmp/test.php * crack_opendict("/usr/share/dict/pw_dict"): /usr/share/dict/pw_dict: magic mismatch PHP Warning: crack_opendict(): Could not open crack dictionary: /usr/share/dict/pw_dict in /tmp/test.php on line 7 Warning: crack_opendict(): Could not open crack dictionary: /usr/share/dict/pw_dict in /tmp/test.php on line 7 bool(false) * crack_check("analysis"): trying to open: /usr/share/dict/pw_dict /usr/share/dict/pw_dict: magic mismatch PHP Warning: crack_check(): Could not open default crack dicionary in /tmp/test.php on line 9 Warning: crack_check(): Could not open default crack dicionary in /tmp/test.php on line 9 bool(false) * crack_getlastmessage(): PHP Warning: crack_getlastmessage(): No obscure checks in this session in /tmp/test.php on line 11 Warning: crack_getlastmessage(): No obscure checks in this session in /tmp/test.php on line 11 bool(false) * crack_check("Dysk9queheoj"): trying to open: /usr/share/dict/pw_dict /usr/share/dict/pw_dict: magic mismatch PHP Warning: crack_check(): Could not open default crack dicionary in /tmp/test.php on line 13 Warning: crack_check(): Could not open default crack dicionary in /tmp/test.php on line 13 bool(false) * crack_getlastmessage(): PHP Warning: crack_getlastmessage(): No obscure checks in this session in /tmp/test.php on line 15 Warning: crack_getlastmessage(): No obscure checks in this session in /tmp/test.php on line 15 bool(false) imacat@atlas ~ %