From:             cameron at toucanresolve dot co dot uk
Operating system: Suse Linux
PHP version:      4.3.3
PHP Bug Type:     *General Issues
Bug description:  Scripts posting twice

Description:
------------
When running some scripts the scripts runs twice. We are using apache 2 on
a suse linux box. It generaly happens when the header function is being
used with the location header. The script want get a far as the header but
will re-run. If i put a die in it wont die and will still run twice. I
have tested this by adding a seesion var names count and incrementing it
each time the script is run. I always get two.

Reproduce code:
---------------
<?php
  
  session_start();

  if(!isset($_SESSION["Count"])){
      $_SESSION["Count"]++;
  }
  else{
      $_SESSION["Count"] = 0;
  }

  header("Location:gosomeware.php");

?>

Expected result:
----------------
Should out put 0

Actual result:
--------------
1

-- 
Edit bug report at http://bugs.php.net/?id=26523&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26523&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26523&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26523&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26523&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26523&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=26523&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=26523&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26523&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26523&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26523&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26523&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26523&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26523&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26523&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26523&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26523&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26523&r=float

Reply via email to