Re: [PHPLIB] phplib and phorum From: David Tiselius (david.t <email protected>)
Date: 12/08/99

Andreas Otto wrote:
>
> i have recently setup phplib on a website (preview.mm4.de) and it seems to work
> quite well.
> but now that i have to implement some kind of a messageboard system i have run
> into some deep problems.
>
> i tried to use phorum and make it work with phplib and fit into the
> design/template of the website. somehow i receive on some of the phorum pages a
> couple of errors.
>
> Warning: Cannot add more header information - the header was already sent
> (header information may be added only before any output is generated from the
> script -
> check for text or whitespace outside PHP tags, or calls to functions that output
> text) in session.inc on line 430
>
> well, it's quite obvious what it means but i couldn't figure out where phorum
> starts to write html output before the html part of the document starts. the
> source code of the page displays a comment before php issues the warnings.

I had the same, but all it turned out to b was a pesky newline in
swedish.lang.
>
> <p>
> <!--select news.id, news.thread, author, subject, datestamp, body from news,
> news_bodies where news.id = news_bodies.id and (body like '%test%' OR subject
> like '%test%' OR author like '%test%') order by id desc limit 20-->
>
> and on the bottom of the page i get som other errors:
>
> Warning: Bad escape sequence: \' in session.inc on line 265
>
> where line 265 says:
> $this->serialize($prefix."['".ereg_replace("([\\\'])", "\\\\1",
> $k)."']", &$str);
>
> so if anyone had similar problems or knows about a message board system which is
> easy to integrate into an existing application using the phplib feel free to
> tell me about it.
>
> andreas

I got rid of the 265-line problem by changing it from

$this->serialize($prefix."['".ereg_replace("([\\\'])", "\\\\1",
$k)."']", &$str);

to

$this->serialize($prefix."['".ereg_replace("([\\'])", "\\\\1", $k)."']",
&$str);

(Thanks to Charles Hagenbuch).

Then all you have to do is to change all the links in phorum (if you
want to be able to use GET-fallback that is) to $sess->url(url), which
is a sort of tedious... ;)

Cheers

-- 
:::::::::::::::::::::::::::::::::::::
 David Tiselius,  david.t <email protected>
:::::::::::::::::::::::::::::::::::::
-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.