From: icui at email dot it Operating system: Linux 2.6.3 PHP version: 4.3.9 PHP Bug Type: Apache2 related Bug description: Function Repeat Twice
Description: ------------ The following script generates two files copies. The same script executed without Apache works properly and generates single file copy. With $URL_CSS_ defined works properly. (row 13) Deleting row 15 works properly. Apache seems to execute twice the script, second in background. I don't understand why. Tested with: Php 5.0.1 - 4.3.9 - 4.3.4 On Linux System kernel 2.4, 2.6 NB. In Windows seems to work properly. (not tested personally) Reproduce code: --------------- <? $id = uniqid('bug'); $wrk_dir = ''; // Working Directory $src_file = 'grab.jpg'; // Source File $dst_file = 'tmpgrab_'.$id.'.jpg'; // New File echo 'Source File ='.$src_file.'<br />'; // Print Source File Name echo 'Destination File ='.$dst_file.'<br />'; // Print Destination File Name if (!copy($wrk_dir.$src_file, $wrk_dir.$dst_file)) { echo 'Failed to copy.<br />'; } //$URL_CSS_='string'; ?> <link rel="stylesheet" href="<?=$URL_CSS_?>" type="text/css" /> Expected result: ---------------- I expect that a new file is created in my $wrk_dir Actual result: -------------- Script generates two copies from original file. -- Edit bug report at http://bugs.php.net/?id=30803&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30803&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30803&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30803&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30803&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30803&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30803&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30803&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30803&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30803&r=support Expected behavior: http://bugs.php.net/fix.php?id=30803&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30803&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30803&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30803&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30803&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30803&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30803&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30803&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30803&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30803&r=mysqlcfg