ID:               22546
 Comment by:       diz at ysagoon dot com
 Reported By:      4u at direct-netware dot de
 Status:           Bogus
 Bug Type:         Filesystem function related
 Operating System: WinNT
 PHP Version:      4.3.1
 New Comment:

Ok, well the problem I spoke about is solved with PHP 4.3.2.

Gabriel


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

[2003-08-02 05:56:38] diz at ysagoon dot com

I don't know if this is related, but I think so. Please tell me if I
should better submit this as a new bug.

The fseek teleports my file pointer to some strange places. I'm using
Win2K (NT5 SP4) with administrative rights and I'm running EasyPhp
1.6.0.0 that contains PHP 4.2.0. But the same script works on Debian
GNU/Linux 2.2.20 with PHP 4.1.2!

Here's my example script (note that none of the two fseek methods
work):

function getChar($fp, &$c)
{
    $c=fgetc($fp);
    if(feof($fp))
        return false;
    return true;
}

$fp=fopen('parseTest.txt','r');
while(true)
{
    $c=fgetc($fp);
    if(feof($fp))
        break;
    echo("$c");

    //fseek($fp, -1, SEEK_CUR);
    fseek($fp, ftell($fp)-1);

    $c=fgetc($fp);
    if(feof($fp))
        break;
    echo("$c");
}
fclose($fp);
echo('<EOF>');

The file that I read contains just this:
Hello World!

The correct output on Debian GNU/Linux 2.2.20 with PHP 4.1.2:
hheelllloo  wwoorrlldd!!

<EOF>

The problematic output on Win2k with PHP 4.2.0:
h<EOF>

Ok that's it. Thank you for your support! :)

Gabriel

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

[2003-03-05 08:17:52] 4u at direct-netware dot de

Strange things happening here - I will check it before getting on your
nerves again ;)

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

[2003-03-05 07:54:57] 4u at direct-netware dot de

I know how to install PHP using a ZIP-file...
1,22 MB (1.286.144 Bytes) - Is this the right dll? (At least this is
the dll in the snapshot I downloaded - Last edited today)

The error still exists with the dll, mentioned above!

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

[2003-03-05 06:48:56] [EMAIL PROTECTED]

Just replace every existing php4ts.dll with the new one from the
snapshot package..and make sure nothing is running when you do this.



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

[2003-03-05 06:25:52] 4u at direct-netware dot de

I'm sorry, but then the bug isn't (completly?) removed - used snapshot
resulting fread-error: php4-win32-STABLE-200303050930

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/22546

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

Reply via email to