#47617 [NEW]: rss feed / tag causes php script to execute twice

From: Date: Tue, 10 Mar 2009 22:56:45 +0000
Subject: #47617 [NEW]: rss feed / tag causes php script to execute twice
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-134580@lists.php.net to get a copy of this message
From:             matthew dot scott dot day at gmail dot com
Operating system: Mac OS X 10.5.5
PHP version:      5.2.9
PHP Bug Type:     Scripting Engine problem
Bug description:  rss feed / tag causes php script to execute twice

Description:
------------
While outputting rss tags directly to the browser, the php script executes
twice.

Reproduce code:
---------------
<?php
header("Content-type: application/xhtml+xml");
?>

<rss version="2.0">
	<SomeData>some stuff here</SomeData>
</rss>

<?php
	$fname = '/tmp/'.microtime().'.txt';
	file_put_contents($fname, "2 files will be created when you run this code
once");
?>

Expected result:
----------------
I expect only 1 file to be created in /tmp/

Actual result:
--------------
2 files are created in /tmp/

-- 
Edit bug report at http://bugs.php.net/?id=47617&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        http://bugs.php.net/fix.php?id=47617&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        http://bugs.php.net/fix.php?id=47617&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        http://bugs.php.net/fix.php?id=47617&r=trysnapshot60
Fixed in CVS:                        http://bugs.php.net/fix.php?id=47617&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47617&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=47617&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=47617&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=47617&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=47617&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=47617&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=47617&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=47617&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=47617&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=47617&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=47617&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=47617&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=47617&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=47617&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=47617&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=47617&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=47617&r=mysqlcfg



Thread (11 messages)

« previous php.bugs (#134580) next »