[pmwiki-devel] problem with POST vs GET in form
Peter Bowers
pbowers at pobox.com
Fri Apr 17 12:59:11 CDT 2009
OK, I've been able to greatly simplify this problem. And I've even
eliminated the form because the standard edit form (since it uses
POST) reproduces the problem just fine.
Here's the text I have to put in the page:
===(snip)===
{(writeapage Test.Test)}
===(snip)===
Here's the underlying code with the definition for the markup expression.
===(snip)===
$MarkupExpr['writeapage'] = 'WriteAPage($pagename, @$argp, @$args)';
function WriteAPage($pagename, $opt, $args)
{
$pn = MakePagename($pagename, $args[0]);
if (!$pn) return('must specify pagename');
$page = RetrieveAuthPage($pn, 'edit');
$newpage = $page;
$newpage['text'] = 'RANDOM: ' . rand(0,10000);
if (!UpdatePage($pn, $page, $newpage))
echo "ERROR: UpdatePage()<br>\n";
return;
}
===(snip)===
When I have that code in config.php and I attempt to save a page with
that source I consistently get this error:
===(snip)===
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, support at supportwebsite.com
and inform them of the time the error occurred, and anything you might
have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/1.3.33 Server at bookofknowledge.org Port 80
===(snip)===
I emphasize that this is *not* reproducible on other hosts that I have
tried -- just on this one host.
Does anybody have any idea of any settings that would cause this error
on the exit from a markup expression if (1) the markup expression
writes to a page via UpdatePage() and (2) there is any data in the
$_POST...?
-Peter
More information about the pmwiki-devel
mailing list