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

The Editor editor at fast.st
Fri Nov 24 14:59:21 CST 2006


Still having troubles with ZAPforms in the Sidebar issue.  I'm
thinking it might be a bug in how PmWiki processes the sidebars, as
the forms work perfect everywhere else in the page.  Even multiple
forms on a page....

Below is the markup that is causing the problem.  The only part that
is causing the errors.  I also included once again the error message.
If anyone has any suggestions, I would definitely appreciate it.  I
would even settle for some tips on how to debug this thing.  Don't
have a clue what to check or how.

Right now I have hardcoded a jumplist menu, but I really need zap in
the sidebars. Hoping someone will have a brainstorm...

Cheers,
Caveman

PS.  It works fine in my home machine, so perhaps it is a php or
server configuration error?  Something to do with caching?  I'm
clasping at straws. My home and server config files look virtually
identical....

> Here's the markup and function (in full).  As best I can tell, it
> happens with this markup, and not without it.
>
> Markup('zapform', '>{$var}', '/\(:zapform(.*?):\)/ei', "ZAPform('$1')");
>
> function ZAPform($d) {
>   global $pagename;
>   if (strpos($d, "`")) $l = substr($d, strpos($d, ' `') + 2,
> strpos($d, '` ') - 2);
>   else $l = "nolock";
>   $u = "";
>   if (strpos($d, "upload")) $u = " method=post enctype=multipart/form-data";
>   $o = "";
>   if (strpos($d, "orderform")) $o .= " name=orderform";
>   $unique = false;
>   session_start();
>   while (!$unique) {
>      $x = rand(100000,999999);
>      if (! isset($_SESSION[ZAPlock]["$pagename-$x"])) $unique = true;
>      }
>   $_SESSION[ZAPlock]["$pagename-$x"] = $l;
>   session_write_close();
>   return "(:input form$u$o:)\n(:input hidden action zap:)\n(:input
> hidden ZAPkey $x:)\n";
>   }

Here's the error message.  It shows up in the sidebar as well.  Line
452 in ZAP is in the function above.

> > Warning: session_start() [function.session-start]: Cannot send session
> > cookie - headers already sent by (output started at
> > /home/fastst/public_html/zap/pmwiki.php:951) in
> > /home/fastst/public_html/zap/cookbook/zap.php on line 452
> >
> > Warning: session_start() [function.session-start]: Cannot send session
> > cache limiter - headers already sent (output started at
> > /home/fastst/public_html/zap/pmwiki.php:951) in
> > /home/fastst/public_html/zap/cookbook/zap.php on line 452



More information about the pmwiki-devel mailing list