[pmwiki-users] unmatched parenthesis error = old PHP and Apache?

Patrick R. Michaud pmichaud at pobox.com
Sat Feb 16 17:47:42 CST 2008


On Sat, Feb 16, 2008 at 04:31:49PM -0600, Ben Stallings wrote:
> I just installed the current beta of PmWiki for a client hosted at 
> mysite.com, a host I've never worked with before, and I'm getting some 
> perplexing messages.  For example, if you go to
> http://oksustainabilitynow.org/cgi/pmwiki/pmwiki.php?n=Calendar
> you get
> 
> Warning: Compilation failed: unmatched parentheses at offset 8 in 
> /www/cgi/pmwiki/pmwiki.php on line 1495
> 
> the first time, but if you reload it comes up just fine.  (Needless to 
> say there are no unmatched parentheses at that location.)

It could be an unmatched paren in a pattern as opposed to the
code itself, especially if the line has a call to preg_replace or 
preg_match in it somewhere.

> Furthermore, if you go to a page that doesn't exist, such as
> http://oksustainabilitynow.org/cgi/pmwiki/pmwiki.php?n=Foo.Bar
> 
> you get a much uglier Internal Server Error -- the server seems unable 
> to handle 404 errors the way that PmWiki likes.

I just noticed that the Content-type: header that PmWiki produces
has an extra semicolon at the end... perhaps the server software
is complaining about that.  You could try removing that semicolon--
on line 165, get rid of the semicolon after ISO-8859-1.  I.e.,
change

  "Content-type: text/html; charset=ISO-8859-1;");

to

  "Content-type: text/html; charset=ISO-8859-1");

If that fixes the problem, I'll make the change in an upcoming release.

Pm



More information about the pmwiki-users mailing list