[pmwiki-users] php 5.2.1 problem (serious)
Henrik
henrik.bechmann at sympatico.ca
Sun Mar 18 20:12:47 CDT 2007
Yes errors are being written to the error_log (I've notified the web
service), but I don't immediately see how this would selectively cause
issues with rendering (see below). Interestingly the errors occur in
both the xampp and the webserve.ca (webhost) environments. I have notify
turned on in the web host environment, but not on my desktop.
Re: memory limit, my xampp local installation has a (default) memory
limit set of 32MB, but the same behaviour occurs, ie most pages render
fine, while the problem page renders up to a (specific) size limit, then
doesn't render.
The output is getting clobbered somewhere in here: pmwiki.php function
MarkupToHTML (I've commented out the debug code):
# $iteration=0;
while (count($lines)>0) {
# $iteration++;
# echo "<hr>ITERATION:".$iteration."******** COUNT
LINES:".count($lines)."<BR><BR>";
$x = array_shift($lines);
# echo "<BR><BR> length of x(before): ".strlen($x)." ++++++++<BR><BR>";
$RedoMarkupLine=0;
# $markuprulecount=0;
foreach($markrules as $p=>$r) {
# $markuprulecount++;
# echo "<BR><BR> markuprulecount: ".$markuprulecount." length of
x(inside BEFORE): ".strlen($x)."<BR><BR>";
if ($p{0} == '/') {
# if ($markuprulecount==23) echo $p . " => " .$r ." ==>>
".$x."<BR><BR>";
$x=preg_replace($p,$r,$x); # <<<==== SEEMS TO GET CLOBBERED HERE,
BUT ONLY AFTER SOME ITERATIONS
# echo "<BR><BR> markuprulecount: ".$markuprulecount." length of
x(inside AFTER): ".strlen($x)."<BR><BR>";
} elseif (strstr($x,$p)!==false) {
$x=eval($r);
}
if (isset($php_errormsg)) { echo "pat=$p"; unset($php_errormsg); }
if ($RedoMarkupLine) {
$lines=array_merge((array)$x,$lines);
continue 2;
}
}
# echo "<BR><BR> length of x(after): ".strlen($x)." ++++++++<BR><BR>";
if ($x>'') $out .= ($x."\n");
}
Debug output, fourth $iteration:
markuprulecount: 23 length of x(inside BEFORE): 101846
/\(:(if[^ ]*?):\)(.*?)(?=\(:if[^ ]*?:\)|$)/sei =>
CondText($pagename,PSS('$1'),PSS('$2')) ==>>
<the markup string goes in here -- very long>.
markuprulecount: 23 length of x(inside AFTER): 0
There is no (:if:) directive in the wiki text.
That's as far as I have gotten. I haven't yet isolated what the exact
problem is. If you can spot something in here, you're a better man than
me<grin>...
The truncated page (same page, lots of wikitext taken off the bottom),
renders with $x length of max 33,322, tantalizingly close to 32K but a
bit over. The page that doesn't render has $x of about 100K.
Here's the text I add to the bottom of the truncated page to put it over
the threshold and not render:
------------------
High minus 12, low minus 18. Cold enough that the ice was good but not many people came out to skate.
------------------
As you can see, nothing of obvious interest that might generate such a
problem.
Yes I have some recipes, I'll look into turning them off.
Any suggestions gratefully received.
(Arghhh)
- Henrik
=========================================================================
Here is a sample of the error log messages:
[18-Mar-2007 01:00:06] PHP Warning: PHP Startup: Unable to load dynamic
library
'/usr/local/lib/php/extensions/no-debug-non-zts-20041030/mailparse.so' -
/usr/local/lib/php/extensions/no-debug-non-zts-20041030/mailparse.so:
undefined symbol: empty_string in Unknown on line 0
[18-Mar-2007 01:00:06] PHP Warning: PHP Startup: R3: Unable to
initialize module
Module compiled with module API=20041030, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[18-Mar-2007 01:00:06] PHP Warning: PHP Startup: Unable to load dynamic
library '/usr/local/lib/php/extensions/no-debug-non-zts-20041030/zip.so'
- /usr/local/lib/php/extensions/no-debug-non-zts-20041030/zip.so:
undefined symbol: empty_string in Unknown on line 0
[18-Mar-2007 01:00:07] PHP Warning: Zend Optimizer does not support
this version of PHP - please upgrade to the latest version of Zend
Optimizer in Unknown on line 0
[18-Mar-2007 01:20:31] PHP Warning: PHP Startup: Unable to load dynamic
library
'/usr/local/lib/php/extensions/no-debug-non-zts-20041030/mailparse.so' -
/usr/local/lib/php/extensions/no-debug-non-zts-20041030/mailparse.so:
undefined symbol: empty_string in Unknown on line 0
[18-Mar-2007 01:20:31] PHP Warning: PHP Startup: Ró : Unable to
initialize module
Module compiled with module API=20041030, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[18-Mar-2007 01:20:31] PHP Warning: PHP Startup: Unable to load dynamic
library '/usr/local/lib/php/extensions/no-debug-non-zts-20041030/zip.so'
- /usr/local/lib/php/extensions/no-debug-non-zts-20041030/zip.so:
undefined symbol: empty_string in Unknown on line 0
[18-Mar-2007 01:20:31] PHP Warning: Zend Optimizer does not support
this version of PHP - please upgrade to the latest version of Zend
Optimizer in Unknown on line 0
[18-Mar-2007 01:46:26] PHP Warning: PHP Startup: Unable to load dynamic
library
'/usr/local/lib/php/extensions/no-debug-non-zts-20041030/mailparse.so' -
/usr/local/lib/php/extensions/no-debug-non-zts-20041030/mailparse.so:
undefined symbol: empty_string in Unknown on line 0
[18-Mar-2007 01:46:26] PHP Warning: PHP Startup: R3: Unable to
initialize module
Module compiled with module API=20041030, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
Patrick R. Michaud wrote:
> On Sun, Mar 18, 2007 at 04:19:00PM -0400, Henrik wrote:
>
>> 1. I am using PmWiki version 2.1.26
>>
>> 2. I have incrementally removed content from one of the pages that
>> doesn't render, and there is a threshold under which it does render, not
>> apparently associated with any specific wiki markup, just volume. So the
>> truncated page
>>
>> http://www.dufferinpark.ca/cityrinks/wiki/wiki.php?n=DufferinParkRink.WinterDiary2006-2007
>>
>> renders, but the original (longer page)
>>
>> http://www.dufferinpark.ca/cityrinks/wiki/wiki.php?n=DufferinParkRink.WinterDiary2006-2007-original
>>
>> doesn't, even though there's lots of content:
>>
>> http://www.dufferinpark.ca/cityrinks/wiki/wiki.php?n=DufferinParkRink.WinterDiary2006-2007-original?action=source
>>
>
> Weird. I notice that your PHP environment is running with memory limits enabled
> (of 64MB) -- so perhaps PmWiki is hitting the memory limit. This doesn't seem
> likely, though, as 64MB is a huge amount of memory.
>
> FWIW, the most I've ever seen a page require on pmwiki.org is 24MB.
>
> What recipes are you running on the site? Perhaps a recipe is
> causing the difficulty.
>
> Is there an error_log file somewhere for the site? It might have some
> very useful clues.
>
> Pm
>
>
>
--
Henrik Bechmann
www.bechmann.ca
Webmaster, www.dufferinpark.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20070318/ca929b58/attachment.html
More information about the pmwiki-users
mailing list