Bug #18350 Updated: PHP script executed twice

From: Date: Mon, 15 Jul 2002 13:31:16 +0000
Subject: Bug #18350 Updated: PHP script executed twice
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-14206@lists.php.net to get a copy of this message
ID: 18350 Updated by: jobartim@voila.fr Reported By: jobartim@voila.fr Status: Bogus Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 4.2.1 New Comment: I really think that it is a bug in the sense that PHP executes the script twice and I don't understand why PHP should have to execute it twice !!! Previous Comments: ------------------------------------------------------------------------ [2002-07-15 09:11:23] hholzgra@php.net Sorry, but the bug system is not the appropriate forum for asking support questions. Your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php Thank you for your interest in PHP. ------------------------------------------------------------------------ [2002-07-15 09:07:33] jobartim@voila.fr I just forget to say what is exactly the bug : the script executes twice so it deletes 2 lines when I want only one to be deleted ... ------------------------------------------------------------------------ [2002-07-15 09:01:56] jobartim@voila.fr Here is the script which gives problems, this script delete the lines number $i where $tab[$i] == "on" $fp = fopen($file,"r"); $fp2 = fopen("$file.tmp","w"); $i = 0; while($line = fgets($fp,4096)) { if ($tab[$i] != "on") fwrite($fp2,$line); $i++; } fclose($fp2); fclose($fp); rename("$file.tmp",$file); This script is called by a post form. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18350&edit=1

« previous php.bugs (#14206) next »