#34118 [Asn->Csd]: Problem with fseek() + SEEK_SET (unicode_semantics=off)
| From: | tony2001@php.net | Date: | Wed, 05 Oct 2005 17:18:10 +0000 |
| Subject: | #34118 [Asn->Csd]: Problem with fseek() + SEEK_SET (unicode_semantics=off) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-86055@lists.php.net to get a copy of this message | ||
ID: 34118
Updated by: tony2001@php.net
Reported By: xuefer at 21cn dot com
-Status: Assigned
+Status: Closed
Bug Type: Filesystem function related
Operating System: cygwin
PHP Version: 6CVS-2005-08-13
Assigned To: pollita
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2005-08-17 19:28:58] sniper@php.net
Sara, check this out.
------------------------------------------------------------------------
[2005-08-13 13:02:24] 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-13 11:49:59] 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:
--------------
<?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34118&edit=1