ID:               50001
 Updated by:       srina...@php.net
 Reported By:      onzi at ustrem dot org
-Status:           Feedback
+Status:           Bogus
 Bug Type:         Zlib Related
 Operating System: AIX 6.1
 PHP Version:      5.2.11
-Assigned To:      
+Assigned To:      srinatar
 New Comment:

you are better off compiling your own zlib for this platform. the zlib
rpm that you downloaded does not bundle zlib header within and i am not
sure, which version of zlib header your php build is using.

this issue typically happens when the underlying dependent library
(which in this case is zlib) compiled with different options (like
largefiles enabled etc) while php which is using this underlying library
is being compiled with a different option. 

there is no php bug here. compiling php and zlib on this platform works
fine. 

feel free to reopen this bug, if recompiling doesnt help.


Previous Comments:
------------------------------------------------------------------------

[2009-10-27 07:55:05] onzi at ustrem dot org

I use for PHP (--with-zlib-dir=/opt/freeware/lib)
zlib-1.2.3-5
zlib-devel-1.2.3-5
from here: http://gnome.bullfreeware.com/aixtoolbox/RPMS/ppc/zlib/


My env
OBJECT_MODE=32
CC=cc_r
CFLAGS=-O2

------------------------------------------------------------------------

[2009-10-27 01:28:24] srina...@php.net

long story short, by any chance , your PHP compile flags include
-D_FILE_OFFSET_BITS=64 option ? if yes, then the below mentioned error
will happen ?

------------------------------------------------------------------------

[2009-10-26 22:46:13] j...@php.net

Exactly what is the zlib version in your system you linked PHP with?

------------------------------------------------------------------------

[2009-10-26 15:48:01] onzi at ustrem dot org

Read "Expected Result" as "Actual Result"

Sorry

------------------------------------------------------------------------

[2009-10-26 15:45:08] onzi at ustrem dot org

Description:
------------
OSlevel 6100-02-03-0909
xlc 10.1.0.0

I run ./sapi/cli/php ext/zlib/tests/gzseek_basic.phpt

gzopen opens file but gzseek seems to not working.



Reproduce code:
---------------
<?php
$f = dirname(__FILE__)."/004.txt.gz";
$h = gzopen($f, 'r');
var_dump($h);

echo "move to the 50th byte\n";
var_dump(gzseek($h,50));
echo "tell=".gztell($h)."\n";
//read the next 10
var_dump(gzread($h, 10));

echo "\nmove forward to the 100th byte\n";
var_dump(gzseek( $h, 100 ) );
echo "tell=".gztell($h)."\n";
//read the next 10
var_dump(gzread($h, 10));

echo "\nmove backward to the 20th byte\n";
var_dump(gzseek( $h, 20 ) );
echo "tell=".gztell($h)."\n";
//read the next 10
var_dump(gzread($h, 10));
gzclose($h);
?>


Expected result:
----------------
resource(5) of type (stream)
move to the 50th byte
int(-1)
tell=
string(0) ""

move forward to the 100th byte
int(-1)
tell=
string(0) ""

move backward to the 20th byte
int(-1)
tell=
string(0) ""


Actual result:
--------------
move to the 50th byte
int(0)
tell=50
string(10) " high abov"

move forward to the 100th byte
int(0)
tell=100
string(10) "Destiny wh"

move backward to the 20th byte
int(0)
tell=20
string(10) "hrough fee"



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50001&edit=1

Reply via email to