From: hamdi at rawasy dot com Operating system: Irrelevant PHP version: 4.4.7 PHP Bug Type: Feature/Change Request Bug description: headers_sent() is PHP responsibility not Apache! do your job please
Description: ------------ Referring to my previous report that holds ID 42992 http://bugs.php.net/bug.php?id=42992 Yes, PHP is not responsible about virtual() behavior. But I think that it's holding the full responsibility against headers_sent() behavior and I'm asking to fix headers_sent() not virtual(), as it says that headers was already sent while it wasn't, you could send any headers after that and no problems happens (there is no buffer controllers). So, is it still apache problem? Also the filename & line number returned by headers_sent() indicates that headers wasn't sent! and that is stupid behavior Summary You should return true from headers_sent() only when filename & line number are set, otherwise return false. I repeat, this bug is PHP problem located at headers_sent() function! Not anything else. I think that your job here is to fix those bugs not throwing blame at others. So, do your job please! Reproduce code: --------------- <?php virtual("empty.php"); // An empty file var_dump(headers_sent($file, $line), $file, $line); ?> Expected result: ---------------- bool(false) string(0) "" int(0) Actual result: -------------- bool(true) string(0) "" int(0) -- Edit bug report at http://bugs.php.net/?id=43009&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43009&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43009&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43009&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43009&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43009&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43009&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43009&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=43009&r=needscript Try newer version: http://bugs.php.net/fix.php?id=43009&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43009&r=support Expected behavior: http://bugs.php.net/fix.php?id=43009&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43009&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43009&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43009&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43009&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43009&r=dst IIS Stability: http://bugs.php.net/fix.php?id=43009&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43009&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43009&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43009&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=43009&r=mysqlcfg