View Full Version : $20 paypal'd to the person who helps me figure this problem out...
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 ;)
What is line 2 in index.php?
All I have in my index.php file now is:
<html>
<?php include("news.php"); ?>
</html>
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>";
What is that exactly Ed? I'm kinda PHP illiterate :o
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>";
?>
Parse error: parse error in news.php on line 83
If I replace the printf line with $news .= "
Ugh..
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.
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, :)
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.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.