|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-05-13 19:44 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 14:00:01 2026 UTC |
Running this script causes the server to close the connection. When doing a similar operation to delete a record at the end of the file, the server will run the script, delete the record, restart the script, try to delete a non-existant record (I coded an error message) and then works the second time but it thinks it couldn't delete the record. Really weird. I am using the Debian packaged version of PHP. phpinfo() returns this information: Linux cyberhq 2.4.21-pre5 #1 SMP Sat Mar 1 00:30:11 PST 2003 i686 unknown unknown GNU/Linux Apache/1.3.27 (Unix) Debian GNU/Linux PHP/4.2.3 mod_ssl/2.8.14 OpenSSL/0.9.7a Build Date Apr 21 2003 01:48:55 If you need the configure line, just email me. I don't think it is relevant. Here is my script that I used to finally track down the bug. <?PHP // These few lines are for a good hit counter // to see the problem easier. // They don't need to be here to show the problem. // Seed the "hit.txt" file with an initial number $fp = fopen('hit.txt', 'rb'); $Hit = fgets($fp, 1024); fclose($fp); $Hit ++; echo "Hit: $Hit<br>\n"; $fp = fopen('hit.txt', 'wb'); fputs($fp, $Hit); fclose($fp); // The problem. $fp = fopen('php_bug.txt', "w+"); // Uncomment this to kill the process. //fread($fp, 1080648704); echo "Done.";