|
Posted by Steve Brecher on 11/03/01 11:47
Context: I am having a problem with the phpBB package. Currently about
0.4 on the 0-10.0 scale from utter cluelessness to wizardry with respect to
PHP, I find a small debugging package at
http://www.zend.com/zend/tut/tutorial-DebugLib.php
and take the script presented there and name its file debugging.php. It
includes several function definitions, but no other code. So that you don't
have to follow the link, my guess is that the relevant definition is:
function debug_open_window()
{
static $window_opened = FALSE;
if(!$window_opened)
{
?>
<script language="JavaScript">
debugWindow =
window.open("","debugWin","toolbar=no,scrollbars,width=600,height=400");
debugWindow.document.writeln('<html>');
debugWindow.document.writeln('<head>');
debugWindow.document.writeln('<title>PHP Remote Debug
Window</title>');
debugWindow.document.writeln('</head>');
debugWindow.document.writeln('<body><font face="verdana,arial">');
debugWindow.document.writeln('<hr size=1 width="100%">');
</script>
<?
$window_opened = TRUE;
}
}
I insert as the first statement of the phpBB's index.php:
include('debugging.php');
and load index.php. The aim is to see whether the debugging code will parse
error-free. I get the following output prior to the expected first page of
our Forum:
Warning: Cannot modify header information - headers already sent by (output
started at [path]/forum/debugging.php:1) in
[path]/forum/includes/page_header.php on line 483
and two more of the same warnings for lines 485 and 486. Each of these
statements is a call to header().
Am I the only one confused, or is the PHP 4.4.2 that my shared linux/Apache
host is running also confused? I am confused because I don't see how simply
defining functions could generate the warnings.
--
For mail, please use my surname where indicated:
steve@surname.reno.nv.us (Steve Brecher)
Navigation:
[Reply to this message]
|