Can't get it right

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Heras
Registered User
Posts: 39
Joined: Tue May 28, 2002 12:28 pm
Location: The Netherlands
Contact:

Can't get it right

Post by Heras »

I asked this question a few months ago, but nobody had the awnser then.
Maybe someone knows it now.


I had installed phpbb 2.0.1 on lycos but i get a few errors where i want a sollution for. I get this errors when i register:

Code: Select all

Warning: Cannot add header information - headers already sent in page_header.php on line 449 

Warning: Cannot add header information - headers already sent by (output started at /data/members/free/tripod/nl/h/e/r/heras_online/htdocs/test/php2bb/includes/page_header.php:449) in page_header.php on line 450 

Warning: Cannot add header information - headers already sent by (output started at /data/members/free/tripod/nl/h/e/r/heras_online/htdocs/test/php2bb/includes/page_header.php:449) in page_header.php on line 451
They told me then that is must edit this part in page_header.php:

header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
header ('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');

to:

@header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
@header ('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
@header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');

And this should surpress error messages, they told me.

User Kail came with this reply on an other topic of me about this problem and he said this:

"Yes, but after a while new posts and topics will stop to show up as the browser only will show documents from the cache. You'll need to reload in order to make them appear."


Now my questions:
Has there been an sollution for this ?
And what do i need to do to let it work as i must be ?
Heras
Registered User
Posts: 39
Joined: Tue May 28, 2002 12:28 pm
Location: The Netherlands
Contact:

Post by Heras »

Is there already made a sollution for this, or am i the first with this problem.
Kail
Former Team Member
Posts: 4924
Joined: Mon Oct 22, 2001 9:57 pm
Location: Sweden
Contact:

Post by Kail »

I'm not sure. Didn't you say you'd delete the header code? Adding @ will just suppress error messages, the code will still be executed. However as the code generates errors saying the headers aren't sent the result will still be that the browser will load pages from cache instead of downloading them from the server. This could be solved with <META> tags, I think.

Jakob Persson - Style Designer, Freelance Web Designer, Usability Consultant and Developer | BLOG | PORTFOLIO
My Complete phpBB Template Design Guide
Creator of Chronicles, SpacePilot3K (updated!), Solaris, Cobalt 2.0 and JustFooty.
Image phpbb-se.com - phpBB på svenska!
Heras
Registered User
Posts: 39
Joined: Tue May 28, 2002 12:28 pm
Location: The Netherlands
Contact:

Post by Heras »

When i delete the tags, would it not create errors or other problems ?
Because i don't know what it means.

Maybe i can use a meta-tag with no-cache like this one:
<META HTTP-EQUIV="pragma" CONTENT="no-cache">

Will that work ?
Kail
Former Team Member
Posts: 4924
Joined: Mon Oct 22, 2001 9:57 pm
Location: Sweden
Contact:

Post by Kail »

Keep the header code with the @.

Open overall_header.tpl and add the META code.

Jakob Persson - Style Designer, Freelance Web Designer, Usability Consultant and Developer | BLOG | PORTFOLIO
My Complete phpBB Template Design Guide
Creator of Chronicles, SpacePilot3K (updated!), Solaris, Cobalt 2.0 and JustFooty.
Image phpbb-se.com - phpBB på svenska!
Heras
Registered User
Posts: 39
Joined: Tue May 28, 2002 12:28 pm
Location: The Netherlands
Contact:

Post by Heras »

This means that my tag is good and that it will work ?
Kail
Former Team Member
Posts: 4924
Joined: Mon Oct 22, 2001 9:57 pm
Location: Sweden
Contact:

Post by Kail »

Yes, probably.

Jakob Persson - Style Designer, Freelance Web Designer, Usability Consultant and Developer | BLOG | PORTFOLIO
My Complete phpBB Template Design Guide
Creator of Chronicles, SpacePilot3K (updated!), Solaris, Cobalt 2.0 and JustFooty.
Image phpbb-se.com - phpBB på svenska!
Heras
Registered User
Posts: 39
Joined: Tue May 28, 2002 12:28 pm
Location: The Netherlands
Contact:

Post by Heras »

Oke, let's try it then.
I still have the 2.0.1 version on my computer, the latest version i think.
So i only need to install it again.

Hopefully it works.
Heras
Registered User
Posts: 39
Joined: Tue May 28, 2002 12:28 pm
Location: The Netherlands
Contact:

Post by Heras »

Oke, i just installed phpbb again.

Changed the few things above. The thing wih the @ and the metatag in overall_header.tpl.

Works fine till now. So the only thing i have to do is post and see if anything goes wrong.
Image
User avatar
Mr. Rod
Registered User
Posts: 2
Joined: Mon Jul 01, 2002 6:46 pm

Post by Mr. Rod »

Could you please specify where I should put these META on overall_header.tpl?

TY
Kail
Former Team Member
Posts: 4924
Joined: Mon Oct 22, 2001 9:57 pm
Location: Sweden
Contact:

Post by Kail »

Below the other META tags.

Jakob Persson - Style Designer, Freelance Web Designer, Usability Consultant and Developer | BLOG | PORTFOLIO
My Complete phpBB Template Design Guide
Creator of Chronicles, SpacePilot3K (updated!), Solaris, Cobalt 2.0 and JustFooty.
Image phpbb-se.com - phpBB på svenska!
Heras
Registered User
Posts: 39
Joined: Tue May 28, 2002 12:28 pm
Location: The Netherlands
Contact:

Post by Heras »

This is where i put it in overall_header.tpl:

Code: Select all

<title>{SITENAME} :: {PAGE_TITLE}</title>
<META HTTP-EQUIV="pragma" CONTENT="no-cache"> 
<!-- link rel="stylesheet" href="templates/subSilver/{T_HEAD_STYLESHEET}" type="text/css" -->
Image
Kail
Former Team Member
Posts: 4924
Joined: Mon Oct 22, 2001 9:57 pm
Location: Sweden
Contact:

Post by Kail »

Looks good.

Jakob Persson - Style Designer, Freelance Web Designer, Usability Consultant and Developer | BLOG | PORTFOLIO
My Complete phpBB Template Design Guide
Creator of Chronicles, SpacePilot3K (updated!), Solaris, Cobalt 2.0 and JustFooty.
Image phpbb-se.com - phpBB på svenska!
User avatar
Mr. Rod
Registered User
Posts: 2
Joined: Mon Jul 01, 2002 6:46 pm

Post by Mr. Rod »

Thank you ppl.
Der Robe
Registered User
Posts: 54
Joined: Fri Apr 05, 2002 10:10 pm
Contact:

Post by Der Robe »

can some one tell me where the .tpl file is located cant seem to find it???
WANTED:
Artists and debaters

The Pit
Locked

Return to “2.0.x Support Forum”