Date: 08/25/00
- Next message: opoplawski <email protected>: "[PHP-DEV] PHP 4.0 Bug #6362: sapi/apache/mod_php4.c fails: structure has no member named `_shutdown'"
- Previous message: Andreas <email protected>: "[PHP-DEV] PHP 4.0 Bug #6360: Enable use of exported DLL functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: alex <email protected>
Operating system: RH Linux 6.0
PHP version: 4.0.1pl2
PHP Bug Type: Misbehaving function
Bug description: unpack fails with 'H'
This script fails complaining about there isn't enougth data for unpack:
$md5_val = '0123456789abcdef0123456789abcdef';
print "{$md5_val}<br>\n";
$binary_md5 = pack('H32', $md5_val);
$md5_val = unpack('H32a', $binary_md5);
$md5_val = $md5_val['a'];
print "{$md5_val}<br>\n";
It's corresponding perl scripts works fine:
#!/usr/bin/perl
$md5_val = '0123456789abcdef0123456789abcdef';
print "$md5_val\n";
$binary_md5 = pack('H32', $md5_val);
($md5_val) = unpack('H32', $binary_md5);
print "$md5_val\n";
Workarround:
$md5_val = unpack('H32a', $binary_md5.$binary_md5);
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: opoplawski <email protected>: "[PHP-DEV] PHP 4.0 Bug #6362: sapi/apache/mod_php4.c fails: structure has no member named `_shutdown'"
- Previous message: Andreas <email protected>: "[PHP-DEV] PHP 4.0 Bug #6360: Enable use of exported DLL functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

