php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34118 Problem with fseek() + SEEK_SET (unicode_semantics=off)
Submitted: 2005-08-13 11:49 UTC Modified: 2005-10-05 19:18 UTC
From: xuefer at 21cn dot com Assigned: pollita (profile)
Status: Closed Package: Filesystem function related
PHP Version: 6CVS-2005-08-13 OS: cygwin
Private report: No CVE-ID: None
 [2005-08-13 11:49 UTC] xuefer at 21cn dot com
Description:
------------
fseek SEEK_SET bug under cygwin
tested with lastest CVS checkout

Reproduce code:
---------------
<?php
$fp = fopen(__FILE__, "rb");
fseek($fp, 0, SEEK_SET);
echo fread($fp, 1);
fseek($fp, 0, SEEK_SET);
echo fread($fp, 1);
?>

Expected result:
----------------
<<

Actual result:
--------------
<?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-13 13:02 UTC] xuefer at 21cn dot com
btw. unicode_semantics=Off

phpmyadmin code:
$config_fd = fopen($cfgfile_to_load, 'r');
fread($config_fd, filesize($cfgfile_to_load));
fail to read whole file if it's big enough (40k in my case)
 [2005-08-17 19:28 UTC] sniper@php.net
Sara, check this out.
 [2005-10-05 19:18 UTC] tony2001@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 11:01:34 2024 UTC