Re: PHP 4.0 Bug #9617 Updated: fileposition error

From: Date: Tue, 13 Mar 2001 17:05:39 +0000
Subject: Re: PHP 4.0 Bug #9617 Updated: fileposition error
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-48813@lists.php.net to get a copy of this message
Hello Bug, Tuesday, March 13, 2001, 12:34:46 PM, you wrote: BD> ID: 9617 BD> Updated by: dbeu BD> Reported By: achim@lkcc.org BD> Old-Status: Open BD> Status: Closed BD> Bug Type: Filesystem function related BD> Assigned To: BD> Comments: BD> following script works okay for me (win2k) so closing. BD> <?php BD> $output = fopen("test.txt", "a+"); BD> echo "bytes written: ", fputs($output, "test"), "\n<br>file BD> offset: ". ftell($output); BD> fclose($output); ?>> BD> Previous Comments: BD> --------------------------------------------------------------------------- BD> [2001-03-08 06:02:20] achim@lkcc.org BD> Open an existing text file (insert some crap before) like: BD> $output = fopen("test.txt", "a"); #we want append something BD> Here is the problem: BD> $position = ftell($output); #returns always 0 and not the real fileposition!!! BD> fputs($output, "test"); #but this works without any problems (it has the real BD> fileposition, but ftell gets the false one) BD> I found this bug only on windows systems, not on linux. BD> Achim BD> --------------------------------------------------------------------------- BD> ATTENTION! Do NOT reply to this email! BD> To reply, use the web interface found at BD> http://bugs.php.net/?id=9617&edit=2 do you tried to get the fileposition before you write something with fputs???? and i tested it only with "a" and not with "a+", may be there is a difference... you can get my script on http://www.lkcc.org/achim! search for "#fix for windows?!?!" within the input.php. the whole program doesnt work, if you remove this line from the sourcecode. -- Best regards, Achim mailto:achim@lkcc.org

« previous php.dev (#48813) next »