What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Sick of PHP Error

Pages: (2): « First [ 1 ] 2 » Last »
Sick of PHP Error
Author: Message:
Eddie
Veteran Member
*****


Posts: 2078
Reputation: 30
32 / Male / Flag
Joined: Oct 2005
Status: Away
O.P. Sick of PHP Error
I am TOTALLY sick of the following php error..
code:
Warning: Cannot modify header information - headers already sent by (output started at /home/haboz/public_html/beta1/beta.php:11) in /home/haboz/public_html/beta1/spotlight/index.php on line 11
Whenever i put PHP into my website it stuffs up and comes up with that error. I dont know why it does it and i have searched google and this forum and found various solutions but i just cant seem to fix the stupid thing...the code that my index page links to is in the attachment.


.txt File Attachment: phpcode.txt (2.32 KB)
This file has been downloaded 225 time(s).
...there used to be a signature here :)
08-26-2007 08:34 AM
Profile PM Web Find Quote Report
NanaFreak
Scripting Contest Winner
*****


Posts: 1476
Reputation: 53
32 / Male / Flag
Joined: Jul 2006
RE: Sick of PHP Error
code:
header("Content-Type: image/gif");

do you have any text on the page before this?
08-26-2007 08:37 AM
Profile PM Find Quote Report
Eddie
Veteran Member
*****


Posts: 2078
Reputation: 30
32 / Male / Flag
Joined: Oct 2005
Status: Away
O.P. RE: Sick of PHP Error
code:
<?php

// Get habbo name

$name = $_GET['Test'];
$name2 = urlencode($name);

$hotel = $_GET['.com.au'];
$hotel2 = urlencode($hotel);

header("Content-Type: image/gif");

thats before what you asked in that file, its in the attachment as you can see ^.^

Ok i uploaded my index page to this post to now.

.txt File Attachment: index.txt (2.44 KB)
This file has been downloaded 238 time(s).

This post was edited on 08-26-2007 at 08:42 AM by Eddie.
...there used to be a signature here :)
08-26-2007 08:40 AM
Profile PM Web Find Quote Report
Nathan
Veteran Member
*****

Avatar
Yeah, "large dimensions" ;)

Posts: 2984
Reputation: 76
– / Male / Flag
Joined: Apr 2005
RE: Sick of PHP Error
After <?php use ob_start();

and then just before ?> use ob_end_flush();

:)

Without looking at your code I'm guessing you're using a header

This post was edited on 08-26-2007 at 09:23 AM by Nathan.
Touch Innovation - touch friendly programs/applications for the windows mobile!


08-26-2007 09:13 AM
Profile E-Mail PM Web Find Quote Report
Eddie
Veteran Member
*****


Posts: 2078
Reputation: 30
32 / Male / Flag
Joined: Oct 2005
Status: Away
O.P. RE: Sick of PHP Error
quote:
Originally posted by Napbree
After <?php use ob_flush();

and then just before ?> use ob_end_flush();

:)
After what one?
...there used to be a signature here :)
08-26-2007 09:58 AM
Profile PM Web Find Quote Report
user35870
Disabled Account


Posts: 858
Joined: Aug 2004
Status: Away
RE: Sick of PHP Error
quote:
Originally posted by Eddie
thats before what you asked in that file, its in the attachment as you can see ^.^

Ok i uploaded my index page to this post to now.

Move
code:
header("Content-Type: image/gif");


Up before any output: html/etc.

This post was edited on 08-26-2007 at 10:07 AM by user35870.
08-26-2007 10:05 AM
Profile PM Find Quote Report
Eddie
Veteran Member
*****


Posts: 2078
Reputation: 30
32 / Male / Flag
Joined: Oct 2005
Status: Away
O.P. RE: Sick of PHP Error
code:
header("Content-Type: image/gif");
isn't on a page with any html on it, its on its own php document.
...there used to be a signature here :)
08-26-2007 10:07 AM
Profile PM Web Find Quote Report
hmaster
Senior Member
****

Avatar

Posts: 716
Reputation: 24
33 / Male / Flag
Joined: Nov 2004
RE: RE: Sick of PHP Error
quote:
Originally posted by Eddie
code:
header("Content-Type: image/gif");
isn't on a page with any html on it, its on its own php document.

Yes but it's included on a page with outputted text?
[Image: sig.png]
08-26-2007 10:10 AM
Profile PM Web Find Quote Report
Eddie
Veteran Member
*****


Posts: 2078
Reputation: 30
32 / Male / Flag
Joined: Oct 2005
Status: Away
O.P. RE: Sick of PHP Error
quote:
Originally posted by hmaster
Yes but it's included on a page with outputted text?
The page that the header is on is meant to send an image to the index page yes, here is where it should be...http://www.haboz.net/beta1/beta.php

This post was edited on 08-26-2007 at 10:29 AM by Eddie.
...there used to be a signature here :)
08-26-2007 10:27 AM
Profile PM Web Find Quote Report
hmaster
Senior Member
****

Avatar

Posts: 716
Reputation: 24
33 / Male / Flag
Joined: Nov 2004
RE: Sick of PHP Error
It's because you already have a bit of the page outputted before that page is called, like Napbree said just use ob_*
[Image: sig.png]
08-26-2007 11:05 AM
Profile PM Web Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On