ID: 14684
Updated by: mfischer
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Linux 2.2.18
PHP Version: 4.1.0
New Comment:
There's nothing wrong with pack, neither CGI nor apache. I guess your client can't
handle this.
You can verify this youself with:
<?
$foo = pack('L', 0);
$f = fopen('/tmp/pack', 'wb');
fwrite($f, $foo);
fclose($f);
?>
$ hexdump /tmp/pack
0000000 0000 0000
0000004
As you can see, it's perfectly valid (tested with apache, mod_php).
Previous Comments:
------------------------------------------------------------------------
[2001-12-24 05:34:20] [EMAIL PROTECTED]
I've just compiled CGI version, it works fine, output is "\x00\x00\x00\x00".
Also here's my configure string from phpinfo:
'./configure' '--with-apxs=/www/bin/apxs' '--with-mod_charset' '--without-pear'
'--with-zlib' '--with-bz2' '--with-mysql=/usr' '--disable-xml'
make CFLAGS="-DHAVE_MYSQL_MYSQL_H -I/www/include"
------------------------------------------------------------------------
[2001-12-24 05:09:46] [EMAIL PROTECTED]
<?= pack("L",0); ?>
On PHP 4.1.0, compiled as Apache shared module outputs string "\x20\x20\x20\x20" (4
spaces). It is not "L"-specific issue. <?= pack("C",0); ?> also outputs "\x20".
Any non-zero values are processed OK.
PHP 4.0.1pl2 and 4.0.6 seems to work correctly.
Configuration includes --with-apxs, --with-mysql (bundled), --with-bz2, --without-xml
and --without-pear.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14684&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]