Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 12:32 pm EST
Geeklog Forums
Errors - headers already sent
Anonymous
Anonymous
Here are the errors:
Warning: Cannot add header information - headers already sent by (output started at /home/pcgamers/public_html/games/index.php:9) in /home/pcgamers/public_html/system/lib-sessions.php on line 150
Warning: Cannot add header information - headers already sent by (output started at /home/pcgamers/public_html/games/index.php:9) in /home/pcgamers/public_html/system/lib-sessions.php on line 162
here is what my #9 line says:
9<?php include ("config.php"?>
10<?php
11require ('../lib-common.php');
12$display .= COM_siteHeader();
13$display .= COM_startBlock('Games');
14echo $display;
15?>
5
5
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The error message is caused by the line break between your lines 9 and 10.
There's no need to use opening and closing php tags here - just write
<?php include ("config.php"
require ('../lib-common.php');
etc.
And if you're trying to include Geeklog's config.php here, then you don't even need that line since lib-common.php already includes the config.php.
bye, Dirk
6
6
Quote
Anonymous
Anonymous
nope..im not including the Geeklog's config..here is the code i ended up with but still have those errors displaying:
<?
require ("config.php"
require ('../lib-common.php');
$display .= COM_siteHeader();
$display .= COM_startBlock('Games');
echo $display;
?>
7
7
Quote
Anonymous
Anonymous
Make sure there is nothing before the opening <?php .
6
5
Quote
Status: offline
etegration
Forum User
Full Member
Registered: 02/20/02
Posts: 179
change it to read:
9<?php include ("config.php"
10require ('../lib-common.php');
11$display .= COM_siteHeader();
12$display .= COM_startBlock('Games');
13echo $display;
14?>
and line 14, after ?> there should be no blank space(s).
http://www.etegration.com.sg
http://www.itcow.com
http://www.ministryofhosting.com
http://www.etegration.com.sg
http://www.itcow.com
http://www.ministryofhosting.com
5
6
Quote
Anonymous
Anonymous
could you please to show us line 1-9
6
6
Quote
Anonymous
Anonymous
Here is the whole thing:
<html>
<head>
<title>Gamer's Project</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<?
include ("config.php"
require ('../lib-common.php');
$display .= COM_siteHeader();
$display .= COM_startBlock('Games');
echo $display;
?><form name="search" method="post" action="index.php?temp_view=search.php"><input type="text" name="searchstring" size="12"><input type="submit" name="Submit" value="Go"></form><?php require ("menusl.php" ?><p align="center"><br><?php
if ($temp_view == "" {require ("headlines.php" }
if ($temp_view == "headlines.php" {require ("headlines.php" }
if ($temp_view == "games.php" {require ("games.php" }
if ($temp_view == "view_news.php" {require ("view_news.php" }
if ($temp_view == "view_reviews.php" {require ("view_reviews.php" }
if ($temp_view == "view_previews.php" {require ("view_previews.php" }
if ($temp_view == "view_cheats.php" {require ("view_cheats.php" }
if ($temp_view == "view_guides.php" {require ("view_guides.php" }
if ($temp_view == "guide.php" {require ("guide.php" }
if ($temp_view == "review.php" {require ("review.php" }
if ($temp_view == "preview.php" {require ("preview.php" }
if ($temp_view == "cheats.php" {require ("cheats.php" }
if ($temp_view == "search.php" {require ("search.php" }
if ($temp_view == "game_info.php" {require ("game_info.php" }
if ($temp_view == "pages.php" {require ("pages.php" }
if ($temp_view == "page.php" {require ("page.php" }
if ($temp_view == "post_comments.php" {require ("post_comments.php" }
if ($temp_view == "gallery.php" {require ("gallery.php" }
?>
<?php require ("menusr.php"
$display2 .= COM_endBlock();
$display2 .= COM_siteFooter(true);
echo $display2;
?></body>
</html>
4
7
Quote
Anonymous
Anonymous
i just removed all space after and before <? and ?>..same errors..
5
5
Quote
Status: offline
Tony
Site Admin
Admin
Registered: 12/17/01
Posts: 405
Location:Urbandale, Iowa
These errors typically occur as a result of bad customizations. If errors occur after headers are sent you get these messages. Edit index.php and before it writes out the HTML for the page, put an exit; command. That will force execution to stop and the real problem will get dumped to the screen.---The reason people blame things on previous generations is that there's only one other choice.
The reason people blame things on previous generations is that there's only one other choice.
The reason people blame things on previous generations is that there's only one other choice.
6
5
Quote
Anonymous
Anonymous
and where do i put that command in my case?
5
6
Quote
badguy
Anonymous
Try this:
<?php
include ("config.php"
require ('../lib-common.php');
$display = COM_siteHeader();
$display .= COM_startBlock('Games');
echo $display;
?><form name="search" method="post" action="index.php?temp_view=search.php"><input type="text" name="searchstring" size="12"><input type="submit" name="Submit" value="Go"></ form><?php require ("menusl.php" ?><p align="center"><br><?php
if ($temp_view == "" {require ("headlines.php" }
if ($temp_view == "headlines.php" {require ("headlines.php" }
if ($temp_view == "games.php" {require ("games.php" }
if ($temp_view == "view_news.php" {require ("view_news.php" }
if ($temp_view == "view_reviews.php" {require ("view_reviews.php" }
if ($temp_view == "view_previews.php" {require ("view_previews.php" }
if ($temp_view == "view_cheats.php" {require ("view_cheats.php" }
if ($temp_view == "view_guides.php" {require ("view_guides.php" }
if ($temp_view == "guide.php" {require ("guide.php" }
if ($temp_view == "review.php" {require ("review.php" }
if ($temp_view == "preview.php" {require ("preview.php" }
if ($temp_view == "cheats.php" {require ("cheats.php" }
if ($temp_view == "search.php" {require ("search.php" }
if ($temp_view == "game_info.php" {require ("game_info.php" }
if ($temp_view == "pages.php" {require ("pages.php" }
if ($temp_view == "page.php" {require ("page.php" }
if ($temp_view == "post_comments.php" {require ("post_comments.php" }
if ($temp_view == "gallery.php" {require ("gallery.php" }
require ("menusr.php"
$display2 .= COM_endBlock();
$display2 .= COM_siteFooter(true);
echo $display2;
?>
---Nothing but 'Net
6
6
Quote
Anonymous
Anonymous
subj!
config.php i was calling had 2 empty lines before and after <? and ?>..thank you for your help guys!
5
6
Quote
All times are EST. The time is now 12:32 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content