Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > PHP
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help.

Google
Closed Thread
 
LinkBack Thread Tools Display Modes
Old 07-01-2007, 5:09 PM   #1
Phil Powell
 
Phil Powell's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Header warnings??? Why??

// REDIRECT THEM BACK TO LOGIN
if ($hasSubmittedUsername) {
header("Location: http://$SERVER_NAME/fslogin.php?errorMsg=" .
urlencode($font . '<font color=000099><li>Password
emailed</li></font></font><p>') .
'&username=' . urlencode($username));
}

?>

<html>
<head>
<title><?= $brand ?> Login: Forgot Password</title>

Based on this code snippet (and there is nothing being written to the
headers prior to header("Location.."), why am I getting the following:

Warning: Cannot add header information - headers already sent by (output
started at /home/youth/finesocceryouthsessions-www/fsforgot.php:15) in
/home/youth/finesocceryouthsessions-www/fsforgot.php on line 114

The line is the header() line. Furthermore, instead of being redirected to
fslogin.php I am still at fsforgot.php! Can someone help me quickly, I'm on
a tight deadline!

Thanx
Phil


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Advertisements
Old 07-01-2007, 5:09 PM   #2
Ian.H [dS]
 
Ian.H [dS]'s Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Header warnings??? Why??

On Fri, 15 Aug 2003 16:56:58 -0400 in
<message-id:NOb%a.2803$3M4.744@lakeread04>
"Phil Powell" <soazine@erols.com> wrote:

> // REDIRECT THEM BACK TO LOGIN
> if ($hasSubmittedUsername) {
> header("Location: http://$SERVER_NAME/fslogin.php?errorMsg=" .
> urlencode($font . '<font color=000099><li>Password
> emailed</li></font></font><p>') .
> '&username=' . urlencode($username));
> }
>
> ?>
>
> <html>
> <head>
> <title><?= $brand ?> Login: Forgot Password</title>
>
> Based on this code snippet (and there is nothing being written to the
> headers prior to header("Location.."), why am I getting the following:
>
> Warning: Cannot add header information - headers already sent by
> (output started at
> /home/youth/finesocceryouthsessions-www/fsforgot.php:15)
> in/home/youth/finesocceryouthsessions-www/fsforgot.php on line 114
>
> The line is the header() line. Furthermore, instead of being
> redirected to fslogin.php I am still at fsforgot.php! Can someone
> help me quickly, I'm on a tight deadline!
>
> Thanx
> Phil
>
>



Complete stab in the dark Phil.. is your <?php line on the very first
line of the script? any blanks before that constitutes as data sent as
the body.

As for the other part, are register_globals enabled? Could try:


$_SERVER['SERVER_NAME']



Regards,

Ian

--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Programming, Web design, development & hosting.
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 5:09 PM   #3
Phil Powell
 
Phil Powell's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Header warnings??? Why??

I am now the official idiot of the group.

The very first line of the script is <?php

However, this is how it was formatted:

<?php

// COMMENTS

?>

<?
// ACTUAL SCRIPT including "header"

?>

Notice the space between the <? ?> blocks?

Phil
"Ian.H [dS]" <ian@WINDOZEdigiserv.net> wrote in message
news:20030815220719.23d18bc8.ian@WINDOZEdigiserv.n et...
> On Fri, 15 Aug 2003 16:56:58 -0400 in
> <message-id:NOb%a.2803$3M4.744@lakeread04>
> "Phil Powell" <soazine@erols.com> wrote:
>
> > // REDIRECT THEM BACK TO LOGIN
> > if ($hasSubmittedUsername) {
> > header("Location: http://$SERVER_NAME/fslogin.php?errorMsg=" .
> > urlencode($font . '<font color=000099><li>Password
> > emailed</li></font></font><p>') .
> > '&username=' . urlencode($username));
> > }
> >
> > ?>
> >
> > <html>
> > <head>
> > <title><?= $brand ?> Login: Forgot Password</title>
> >
> > Based on this code snippet (and there is nothing being written to the
> > headers prior to header("Location.."), why am I getting the following:
> >
> > Warning: Cannot add header information - headers already sent by
> > (output started at
> > /home/youth/finesocceryouthsessions-www/fsforgot.php:15)
> > in/home/youth/finesocceryouthsessions-www/fsforgot.php on line 114
> >
> > The line is the header() line. Furthermore, instead of being
> > redirected to fslogin.php I am still at fsforgot.php! Can someone
> > help me quickly, I'm on a tight deadline!
> >
> > Thanx
> > Phil
> >
> >

>
>
> Complete stab in the dark Phil.. is your <?php line on the very first
> line of the script? any blanks before that constitutes as data sent as
> the body.
>
> As for the other part, are register_globals enabled? Could try:
>
>
> $_SERVER['SERVER_NAME']
>
>
>
> Regards,
>
> Ian
>
> --
> Ian.H [Design & Development]
> digiServ Network - Web solutions
> www.digiserv.net | irc.digiserv.net | forum.digiserv.net
> Programming, Web design, development & hosting.



 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 5:09 PM   #4
Ian.H [dS]
 
Ian.H [dS]'s Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Header warnings??? Why??

On Fri, 15 Aug 2003 17:15:06 -0400 in
<message-id3c%a.2918$3M4.1040@lakeread04>
"Phil Powell" <soazine@erols.com> wrote:

> I am now the official idiot of the group.
>
> The very first line of the script is <?php
>
> However, this is how it was formatted:
>
> <?php
>
> // COMMENTS
>
> ?>
>
> <?
> // ACTUAL SCRIPT including "header"
>
> ?>
>
> Notice the space between the <? ?> blocks?



Heh.. it happens Phil.

A while back, I posted a snippet of code here, claiming that further up
in the script (also pasted into the post) was identical to the part that
wasn't working.... I forget who now, but it was pointed out I had missed
a , or ; or something "silly"... but needless to say, the 2 snippets
weren't quite as identical as I thought, lol.

You also stated you're on a tight deadline.. this won't help as you'll
have a tendency to overlook the more "silly / trivial" things, and
probably look for a more complex problem that doesn't actually exist
(yup, done that many a time too ).

Hope all's goin' well fr you now and you hit your deadline =)



Regards,

Ian

--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Programming, Web design, development & hosting.
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 5:10 PM   #5
Richard
 
Richard's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Header warnings??? Why??

Phil Powell wrote:>>

> // REDIRECT THEM BACK TO LOGIN
> if ($hasSubmittedUsername) {
> header("Location: http://$SERVER_NAME/fslogin.php?errorMsg=" .
> urlencode($font . '<font color=000099><li>Password
> emailed</li></font></font><p>') .
> '&username=' . urlencode($username));
> }


> ?>


> <html>
> <head>
> <title><?= $brand ?> Login: Forgot Password</title>


> Based on this code snippet (and there is nothing being written to the
> headers prior to header("Location.."), why am I getting the following:


> Warning: Cannot add header information - headers already sent by (output
> started at /home/youth/finesocceryouthsessions-www/fsforgot.php:15) in
> /home/youth/finesocceryouthsessions-www/fsforgot.php on line 114


> The line is the header() line. Furthermore, instead of being redirected
> to fslogin.php I am still at fsforgot.php! Can someone help me quickly,
> I'm on a tight deadline!


> Thanx
> Phil


Might have a nested tag open somewhere.
I was encountering a similar problem with some coding and when I had enough
close tags, the error went away.
The process continues working it's way down the ladder until it receives an
end point.
If no end point is reached and it passes through more coding, you get the
error.
Which happens a lot in javascript when you have script below the body of the
html. The process runs over into the lower coding and encounters the error.



 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Featured Websites
Free Space
Free Space
Free Space Free Space
Closed Thread
Tags: ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
header location problem march PHP 2 07-01-2007 4:17 PM
PHP default header information Todd Beauchemin PHP 1 07-01-2007 4:12 PM
php header for images Ian.H [dS] PHP 0 07-01-2007 3:58 PM
Firewire bracket header thingy...? Tin-Char D'un Central Processing Unit (CPU) and Overclocking 0 06-17-2007 9:39 PM
Serial Port Header? Tom Lake Motherboards 1 06-11-2007 1:09 PM


Featured Websites




All times are GMT +1. The time now is 1:06 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98