|
|
Joined: Dec 2000
Posts: 25
User
|
|
User
Joined: Dec 2000
Posts: 25 |
Hello, been trying to install the php version 5.15 and seems to have installed OK, and I have set up an admin account but whenI login I get the following error:
Warning: Cannot add header information - headers already sent by (output started at /home/virtual/fatdog/home/httpd/html/bb/theme.inc.php:97) in /home/virtual/fatdog/home/httpd/html/bb/main.inc.php on line 739
What do I need to do to fix this?
Regards
Dan
|
|
|
|
|
Joined: May 1999
Posts: 3,039
Guru
|
|
Guru
Joined: May 1999
Posts: 3,039 |
Have you made any substantial changes to the theme.inc.php file? For some reason the error is stating that theme.inc.php is printing out some headers.
------------------- Scream WWWThreads Developer
UBB.threads Developer
|
|
|
|
|
Joined: Dec 2000
Posts: 25
User
|
|
User
Joined: Dec 2000
Posts: 25 |
No, I haven't made any changes to that file. Should I have made any changes to this file.
Regards
Dan
|
|
|
|
|
Joined: Dec 1999
Posts: 73
Journeyman
|
|
Journeyman
Joined: Dec 1999
Posts: 73 |
Are you on Vservers? I guess not, but if you are you wont be able to install AFAIK.
|
|
|
|
|
Joined: Dec 2000
Posts: 25
User
|
|
User
Joined: Dec 2000
Posts: 25 |
No, I'm not on vservers, I've actually recently got my own dedicated server to cope with the traffic. I run redhat linux and apache. What is AFAIK?
Dan
|
|
|
|
|
Joined: May 1999
Posts: 3,039
Guru
|
|
Guru
Joined: May 1999
Posts: 3,039 |
No changes are necessary for the program to work. I'm just not sure what would be causing the problem. The error is basically this. Any cookies that need to be set have to be sent to the browser before anything else. But apparently part/all of w3ttheme.pm is being sent to the browser when it shouldn't be. Are you using the standard php tags? <? and ?>
------------------- Scream WWWThreads Developer
UBB.threads Developer
|
|
|
|
|
Joined: Dec 2000
Posts: 25
User
|
|
User
Joined: Dec 2000
Posts: 25 |
THanks for the explanation. That's what I thought it meant. I am using standard php tags. Is there anything I should be looking for? Could not setting any of the config-inc settings correctly cause this as there were really the only things I changed.
Regards
Dan
|
|
|
|
|
Joined: May 1999
Posts: 3,039
Guru
|
|
Guru
Joined: May 1999
Posts: 3,039 |
There's one thing you can try. When you get that error, take a look at the source of the HTML page. We might be able to find out what is being printed to the browser by doing this.
------------------- Scream WWWThreads Developer
UBB.threads Developer
|
|
|
|
|
Joined: Dec 2000
Posts: 25
User
|
|
User
Joined: Dec 2000
Posts: 25 |
Below is the source of the html page. I didn't bother pating all the html that followed.
"
<b>Warning</b>: Cannot add header information - headers already sent by (output started at /home/virtual/fatdog/home/httpd/html/bb/theme.inc.php:97) in <b>/home/virtual/fatdog/home/httpd/html/bb/main.inc.php</b> on line <b>739</b>
<b>Warning</b>: Cannot add header information - headers already sent by (output started at /home/virtual/fatdog/home/httpd/html/bb/theme.inc.php:97) in <b>/home/virtual/fatdog/home/httpd/html/bb/main.inc.php</b> on line <b>740</b>
<b>Warning</b>: Cannot add header information - headers already sent by (output started at /home/virtual/fatdog/home/httpd/html/bb/theme.inc.php:97) in <b>/home/virtual/fatdog/home/httpd/html/bb/main.inc.php</b> on line <b>741</b>
<HTML><HEAD><link rel="stylesheet" href="/stylesheets/stylesheet2.css" type="text/css"><TITLE>Welcome, Dan - Forums powered by WWWThreads PHP</TITLE></HEAD><BODY><SPAN CLASS="onbody"><center><table border="0" cellpadding="2" cellspacing="0" width=95% bgcolor="#CECFCE">"
Regards
Dan
|
|
|
|
|
Joined: May 1999
Posts: 3,039
Guru
|
|
Guru
Joined: May 1999
Posts: 3,039 |
Well, nothing is getting printed to the browser that shouldn't be, so I'm not sure where the other header is being sent from. It is saying it is coming from theme.inc.php line 97, which is the end of that file.
What version of PHP are you running? Can you email me your theme.inc.php and config.inc.php files so I can take a look at them?
------------------- Scream WWWThreads Developer
UBB.threads Developer
|
|
|
|
|
Joined: Dec 2000
Posts: 25
User
|
|
User
Joined: Dec 2000
Posts: 25 |
OK, I have sent those files to your email account.
I'm running php 4.04.
Regards
Dan
|
|
|
|
|
Joined: May 1999
Posts: 3,039
Guru
|
|
Guru
Joined: May 1999
Posts: 3,039 |
Ok, I'm still getting used to what is acceptable in PHP, so here is a guess. Both files you sent look fine, but there is one difference between your theme.inc.php and the default one. You have a couple of blank lines after your closing php tag, the ?> at the end of the file. It's possible that these blank lines are being interpreted as header information.[]/w3timages/icons/crazy.gif[/].
Like I said, I'm not sure, but everything else looks totally normal. So, you can try removing the blank lines after the closing php tag and see if that helps.
------------------- Scream WWWThreads Developer
UBB.threads Developer
|
|
|
|
|
Joined: Jun 1999
Posts: 77
Journeyman
|
|
Journeyman
Joined: Jun 1999
Posts: 77 |
Any whitespace at the beginning or end of an included file will cause that error. If the whitespace is enclosed in the tags it's ok. This is a common problem. Most people inadvertanty will hit return key at the beginning or end of a file to cause this. Thank you, Bob [b]Extreme VB Forums -[/b] Visual Basic Help
|
|
|
|
|
Joined: Dec 2000
Posts: 25
User
|
|
User
Joined: Dec 2000
Posts: 25 |
Thanks guys that solved the problem.
Maybe if this is a common problem then the guys who write php could fix that for in the next release.
Once again thanks
Dan
|
|
|
|
|
Joined: Mar 2000
Posts: 84
Member
|
|
Member
Joined: Mar 2000
Posts: 84 |
Its a common PHP problem when working with header information. Absolutely nothing can be sent to the browser before the header tag if you want headers to work without error. That includes simple, albiet invisible, line feeds or breaks. --------- Shalazar www.charisma-carpenter.com
|
|
|
|
|
Joined: Aug 2000
Posts: 3,590 Likes: 1
Moderator
|
|
Moderator
Joined: Aug 2000
Posts: 3,590 Likes: 1 |
Scream,
They are not being intepretated as header information, but header information can not be sent after any information at all, as I guess you already know, and since he's printing blank spaces to the browser before the header, this is enterprated as html..
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 417
Joined: November 2001
|
|
|
Forums63
Topics37,583
Posts293,955
Members13,825
| |
Most Online151,614 Nov 14th, 2025
|
|
Currently Online 3751
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 19
|
|
|
|