Page 1 of 1

php codes in html page: errors

Posted: Thu Jul 20, 2006 11:25 pm
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

Posted: Thu Jul 20, 2006 11:51 pm
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,

php code generates html errors

Posted: Fri Jul 21, 2006 8:58 am
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

Posted: Fri Jul 21, 2006 9:42 am
by Klemen
Yes, everything except the code before (and including) <body>. You can edit this code (up to <body>) in gbook.php

all set, thanks

Posted: Fri Jul 21, 2006 10:12 am
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 !!

error with smileys

Posted: Sat Jul 22, 2006 10:02 am
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)

Posted: Sat Jul 22, 2006 12:14 pm
by Klemen
It works for both scripts for me? Have you managed to fix it?

fixed...

Posted: Sat Jul 22, 2006 12:20 pm
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

one more question:

Posted: Sat Jul 22, 2006 12:53 pm
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
:?:

Posted: Sat Jul 22, 2006 2:52 pm
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.