php codes in html page: errors

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
dirko
Posts: 29
Joined: Wed Mar 29, 2006 7:41 pm

php codes in html page: errors

Post by dirko »

Script URL: http://www.pagina.hu/mboard & http://www.pagina.hu/gbook
Version of script: gbook 1.4 mboard 1.21
Version of PHP: 4.1.12
Hosting company: own RH fBSD
Have you searched THIS FORUM for your problem: YES

If so, what terms did you try: error codes

Write your message below:

trying to implement gbook code from ?> to <? in a template html page.
but then get the following erros:

""Warning: Cannot modify header information - headers already sent by (output started at /home/pagina/domains/pagina.hu/public_html/gbook/gbook.php:13) in /home/pagina/domains/pagina.hu/public_html/gbook/gbook.php on line 1300"" etc.

the code on these lines are:

function printNoCache() {
header("Expires: Mon, 26 Jul 2000 05:00:00 GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
} // END printNoCache


Can i migrate this code somewhere else on the page? coz if we grey 'm out, we got other errors or session/cookie probs.

Please help. :(
dirko
hungary
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Hi,

You shouldn't be editing gbook.php directly unless you are well familiar about PHP and how sessions work. You should paste all your HTML code inside HEADER.TXT and FOOTER.TXT and not edit gbook.php itself.

Same goes for mboard.php

Regards,
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
dirko
Posts: 29
Joined: Wed Mar 29, 2006 7:41 pm

php code generates html errors

Post by dirko »

Hi klemen,

Thanks,
we are not editing the php code, but copied the php code in the templatepage of the site, like we did with mailerforms etc.

Does it mean, the complete html code of these pages should be copied into these .txt files...??

dirko
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Yes, everything except the code before (and including) <body>. You can edit this code (up to <body>) in gbook.php
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
dirko
Posts: 29
Joined: Wed Mar 29, 2006 7:41 pm

all set, thanks

Post by dirko »

Hi Klemen,

thanks a lot, all works fine now. 5 minutes job..

;-))

dirko
hungary

we will donate as well so keep the good work up !!
dirko
Posts: 29
Joined: Wed Mar 29, 2006 7:41 pm

error with smileys

Post by dirko »

Hi,
just one more problem remains:

if we want to use smileys in mboard 1.22 , the smiley.htm appears, but freezes, when we click a smiley.

In gbook it works perfect, and the editing in footer and header was done equally..

both scripts run on www.pagina.hu : under buttons "prikbord" and "guestbook".

we have emptied cache and pages in IE and FF/BonEcho/Opera9

Any idea??

all php files are genuine from the zip file, just the settings.php was edited.
smileys on 1, langfile 'nl'.

hope you have another brilliant idea.. ;-))

dirko
hungary
(dutch)
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

It works for both scripts for me? Have you managed to fix it?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
dirko
Posts: 29
Joined: Wed Mar 29, 2006 7:41 pm

fixed...

Post by dirko »

Hi Klemen,
fixed it. Found the answer with the proper code on this board after searching and reading a while.
we're very happy now...!
Thanks,
dirko
hungary :D
dirko
Posts: 29
Joined: Wed Mar 29, 2006 7:41 pm

one more question:

Post by dirko »

Hi,
one more question:

how can we get the http://www.pagina.hu/mboard/msg/83.html
showing in the html page template? Not only once, but as a standard script?
dirko
:?:
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

All new posts should already be in the template if you used header/footer.txt. The old posts would have to be manually edited.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply