PDA

View Full Version : $20 paypal'd to the person who helps me figure this problem out...


01-01-2001, 11:05 PM
Warning: Cannot add header information - headers already sent by (output started at /www/egamers/index.php:2) in global.php on line 759

I installed WebLog v1.2 from AC-3. I get the problem above when I:

1) Add any HTML to my index.php (a separate one, not vB), besides the <?php include("news.php"); ?> code.
2) I'm not logged into vB

I can get rid of it by:
1) Logging into vB first (or before, just cookied)
2) Having only <?php include("news.php"); ?> in my index.php file.

I looked for line 759 in global.php, the line it's referring to is: if (isset($isnews)) {. That code is from WebLog (in case you didn't know).

I asked Ed how he did it on his vBulletin.org site, but he said he couldn't remember. I tried e-mailing AC-3, but got no response.

I'll PayPal $20 USD to the first person to help me fix this.

BTW: Site URL is: http://egamers.net-games.com/

Sorry for cross-posting this in the PHP Coding forum. I just really need help with this ;)

01-01-2001, 11:51 PM
What is line 2 in index.php?

01-01-2001, 11:57 PM
All I have in my index.php file now is:

<html>
<?php include("news.php"); ?>
</html>

01-02-2001, 12:22 AM
Well, mines very hacked up. My news(2).php doesn't output directly:

$news .= "
<!-- Border -->
<center><table width=\"95%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td bgcolor=\"#000000\">
<!-- End Border -->

<table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\">
<tr bgcolor=\"#006633\">
<td valign=\"middle\"><font size=3 face=\"Verdana, Arial\" color=\"#FFCC00\"><b>$myrow[title]</b></font></td>
</tr>
<tr bgcolor=\"#CCCCCC\">
<td valign=\"top\">
<table width=100% border=0 cellpadding=2 cellspacing=0>
<tr>
<td width=100% valign=\"top\"><font size=2 face=\"Verdana, Arial\"><b>Posted by: <a href=\"mailto:$user[email]\">$myrow[postusername]</a> on $postdate @ $posttime</b></font><font size=2 face=\"Verdana, Arial\"><BR>
<b>";

if ($posts["dept"]) { $news .= "from the ".$posts["dept"]." dept."; }
$news .= "</b><P>$message<P><a href=\"$forum_url/showthread.php?threadid=$myrow[threadid]\">Read More</a> $replies | <a href=\"$forum_url/newreply.php?action=newreply&threadid=$myrow[threadid]\">Reply to this Article</a>";
if ($posts["category"]) {
$news .= "| <a href=\"$forum_url/category.php?category=$posts[category]\">$posts[category]</a>";
}
$news .= "</font></td>";
if ($posts[category]) {
$news .= "<td valign=\"top\" align=\"center\"><a href=\"$forum_url/category.php?category=".$posts["category"]."\"><img src=\"$icon_url/".$posts["category"].".gif\" border=\"0\" hspace=\"2\" vspace=\"2\" alt=\"".$posts["category"]."\"></a></td>\n";
}
$news .= "
</tr>
</table>
</td>
</tr>
</table>

<!-- Border -->
</td></tr></table></center>
<!-- End Border -->
<BR>";

01-02-2001, 12:30 AM
What is that exactly Ed? I'm kinda PHP illiterate :o

01-02-2001, 01:00 AM
You'll have to replace the printf with the same code into a variable. I'm NOT doing this for you. It's simple, but tedious.

Then just:

<?php
require("news.php");
echo "<html>$news</html>";
?>

01-02-2001, 02:16 AM
Parse error: parse error in news.php on line 83

If I replace the printf line with $news .= "

Ugh..

01-02-2001, 04:35 AM
Could a few ppl here do me a lil fav?

Could you go to http://egamers.net-games.com/ & tell me if you still get that cookie or header error?

Somehow it magically fixed itself after about 3 weeks of installing it over & over.

01-02-2001, 11:44 AM
Originally posted by _
Could a few ppl here do me a lil fav?

Could you go to http://egamers.net-games.com/ & tell me if you still get that cookie or header error?

Somehow it magically fixed itself after about 3 weeks of installing it over & over.

Error has gone, :)

01-02-2001, 12:12 PM
I'm such an idiot!

Thank you Ed.. you fixed my problem ;)

My original index was:

<html>
<?php require("news.php"); ?>
</html>


Then Ed kinda told me to put it this way:

<?php
echo "<html>$news</html>
?>

From there I figured out how to do it ;)
[CODE]
<?php
echo "{Header code here}"
require("news.php");
echo "{Footer code here}"
?>


No more errors! Wheee..

Thanks again Ed.. if you want.. I still have that $20.

01-06-2001, 01:03 AM
Give him his money! :D