[pmwiki-devel] Pmwiki bug in SideBars (Pm?)

marc gmane at auxbuss.com
Wed Nov 22 14:05:53 CST 2006


The Editor said...
> On 11/22/06, marc <gmane at auxbuss.com> wrote:
> > The Editor said...
> > > Hate to be a pest, but I've posted this numerous times to no avail.
> > > (Crisses did suggest a couple things).  This is really quite
> > > frustrating and perplexing.  I'm convinced it must be a bug in how
> > > Pmwiki processes sidebars...
> > >
> > > Any thoughts?  Why does PmWiki throw errors for zap forms in sidebars.  Pm?
> >
> > This might be due to a blank line somewhere - typically after a ?> at
> > the end of a .php (cookbook) file. PmWiki is pretty solid with its use
> > of session_write_close, so I'd look elsewhere.
> 
> 
> Thanks Marc, but I'm not sure I follow completely...

Other than Patrick, we are all in the same, but different, boats.
 
> 1).  I'm not using any other recipes but ZAP, and I thought in the
> recipes you weren't supposed to add a closing ?>.  I don't have any at
> all...

Cool. That's a good way to avoid problems.
 
> 2).  I wasn't aware I needed a sesson_write_close for a long while,
> but recently added it to the one place where I store a session
> variable.  PmWiki is still giving me the errors, so perhaps the
> problem is not there.

You don't necessarily need them, imo, but it's not a bad habit to get 
into with PmWiki.
 
> 3) The reason I thought it might be in PmWiki is I only get that
> problem when the form is in the Sidebar.  Everywhere else, it always
> works right.  Seemed logical to conclude the Sidebars must process
> code differently than the main text.

I use a lot of scripts in sidebars - an awful lot - and, as a form of 
caching, I also use session variables a lot too. As such, I sometimes 
run into session-type problems with recipes, but PmWiki hasn't tripped 
me up in this area yet, so it's not a conclusion I'd jump to.

As I'm sure you know, you need to isolate the piece of code that is 
causing the problem. The likelihood is that something - even a single 
space character - is being sent before session_start() (or 
session_register(), if you are using it) in one of your scripts 
(probably zap.php).

-- 
Best,
Marc




More information about the pmwiki-devel mailing list