473,466 Members | 1,294 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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
Jul 16 '05 #1
4 2016
On Fri, 15 Aug 2003 16:56:58 -0400 in
<message-id:NOb%a.2803$3M4.744@lakeread04>
"Phil Powell" <so*****@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.
Jul 16 '05 #2
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]" <ia*@WINDOZEdigiserv.net> wrote in message
news:20030815220719.23d18bc8.ia*@WINDOZEdigiserv.n et...
On Fri, 15 Aug 2003 16:56:58 -0400 in
<message-id:NOb%a.2803$3M4.744@lakeread04>
"Phil Powell" <so*****@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.

Jul 16 '05 #3
On Fri, 15 Aug 2003 17:15:06 -0400 in
<message-id:O3c%a.2918$3M4.1040@lakeread04>
"Phil Powell" <so*****@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.
Jul 16 '05 #4
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.

Jul 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: A | last post by:
Hi, Can you actually compile header files? I'm writing a header file named "test.h" using Visual C++ 6.0 and I get the following error message when I try to compile it: "no compile tool...
3
by: Maciej Pilichowski | last post by:
Hello there, The short version -- how to set warning level just for one specific file, or more exactly how to relax warning level for it? The long version -- I try to work at maximum warning...
9
by: Henry Fr?d?ric | last post by:
I am currently working in Aisin-AW, in development of navigation systems (embedded SW). Since a few weeks, we are checking our source code with splint. We encounter this problem. I hope this...
8
by: nrhayyal | last post by:
Hi c++ Gurus, Need your blessing. while testing few aspects with respect to header file inclusions, i observed few things which i would like to share with you. i have a file sqlca.h in which a...
1
by: Marco Spatz | last post by:
Hi, I used PCLint to check my code yesterday and got some warnings about "Repeated include files" and "Redundant declaration for symbol 'CLASSNAME'". I know the reasons for these warnings and I...
11
by: Gary Wessle | last post by:
Hi is it right to have a line like #include <path/to/header.hfor a library on my system, in my header file and use some functions provided by this library in the implementation file (file.cpp)...
8
by: php newbie | last post by:
I have a simple php page in which I use header("Location: http://www.example.com/"); to redirect the user to another php page. The php script works on my local machine but when I upload it to...
5
by: usenet | last post by:
Is there any way to selectively suppress compiler warnings from designated header files (Ex: Boost header files) using gcc-3.3.1 on Linux PC? We tried using -Wno-system-headers option but it did...
11
by: mdh | last post by:
I decided to make a single file containing all the repetitive functions in K&R so that I could concentrate on the new discussions. This went along just fine, and with each new function, added the...
4
by: henry | last post by:
Folks: Using Dreamweaver CS3... Consider a home page, "index.php" which conditionally REQUIREs one of 'N' HTML files of pure content. All site styles are specified in a master CSS file,...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.