ID: 36698 Updated by: [EMAIL PROTECTED] Reported By: evilcart at gmail dot com -Status: Open +Status: Bogus Bug Type: Apache related Operating System: FreeBSD 5.0 Release PHP Version: 4.4.2 New Comment:
"virtual" does subrequest, i.e. does almost the same as include("http://..."). No bug here. Previous Comments: ------------------------------------------------------------------------ [2006-03-12 10:35:30] evilcart at gmail dot com It's just mistprint, excuse me. Of course, I'm using correct syntax in any working examples. There is also must be </script> instead of </sctipt> printed above, but it doesn't matter, you may instert any code to that output. ------------------------------------------------------------------------ [2006-03-11 20:50:29] judas dot iscariote at gmail dot com what happends if you use CORRECT syntax ? <!--#include virtual="./script.php?$QUERY_STRING" --> NOT <!--#include vurtual="./script.php?$QUERY_STRING" --> ??? ------------------------------------------------------------------------ [2006-03-11 15:41:37] evilcart at gmail dot com Description: ------------ I'm using PHP-script as part of the page by including it in some middle part of the page (e.g. after some HTML code) using Apache SSI directive <!--#include ... --> So when headers_sent() is called before any script output it returns FALSE instead of TRUE. Also, header() function called immideately after that does nothing and executes silently. As I can understand, any HTML code send before SSI #include of script must set headers_sent() to TRUE. I have no any errors suppressed on my php.ini file or by other control directives. Reproduce code: --------------- page.shtml file (simplified): <html> <body> <!--#include vurtual="./script.php?$QUERY_STRING" --> </body> </html> script.php file (simplified): <?php $location = "/some/path/"; if( headers_sent() ) { echo "<script language="JavaScript"> window.location.href = '" . $location . "'</sctipt>"; } else { header('Location: '.$location); // execution goes HERE! And no any effect or error messages. } ?> Expected result: ---------------- <html> <body> <script language="JavaScript"> window.location.href = '/some/path/'; </sctipt> </body> </html> Actual result: -------------- <html> <body> </body> </html> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36698&edit=1