Not logged in. · Lost password · Register
Forum: General Discussion Installation and Configuration RSS
Large pages not parsed
Page:  previous  1  2 
slack #16
Member for 3 months · 13 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 5794
Great, it sounds like you've tracked down the problem.

Could you tell me what you needed to increase pcre.backtrace_limit to in order for it to work?  I've tried increasing it a thousandfold and I get the same result.

I'm editing apache's main php.ini file -- that's the relevant one, isn't it?  I haven't added a php.ini to dokuwiki.

Thanks for your help.
slack #17
Member for 3 months · 13 posts
Group memberships: Members
Show profile · Link to this post
Can anybody actually get this page to parse by increasing the size of pcre.backtrace_limit?  If so, could you let me know a value that works for you?  The source is still at http://home.silencescape.net/~slack/broken-page.source

If not, then this would seem to be a bug that gobbles all available memory for some reason.
grahack #18
Member since May 2007 · 121 posts · Location: Nantes, France
Group memberships: Members
Show profile · Link to this post
Hi,

First, after few attempts, I managed to parse your page BUT without the '**' formatting in the first line, and this without touching php.ini (in fact there is no pcre thing in my basic xampp install). This doesn't solve your problem but I found this to be quite interesting.

Then, I don't understand
I haven't added a php.ini to dokuwiki
slack #19
Member for 3 months · 13 posts
Group memberships: Members
Show profile · Link to this post
Grahack,

Thanks, that's really useful.  At least this confirms my suspicion that this is some sort of bug rather than just me not having configured my server properly.  I should be able to submit a useful bug report now.

By "I haven't added a php.ini to dokuwiki" I just meant that I hadn't added a separate PHP configuration file to the site -- I was just trying to track down exactly which PHP config file it was that was determining the PCRE limit.  I assume a site-specific one would have overridden the default Apache one.

Thanks for your help.
Avatar
jm_zz #20
Member since Aug 2007 · 104 posts · Location: labaquere momas france
Group memberships: Members
Show profile · Link to this post
i reach to parse your page there :
http://jeanmarcmassou.free.fr/dokuwiki/doku.…?id=testbug…

.... no bug . ?
T'as avì dit, que n'i a pas nada estela. I a pas sonque lo movement deus astres e totas la causas. Lo mon còr ? Non. Son tremolar. Benard Manciet
slack #21
Member for 3 months · 13 posts
Group memberships: Members
Show profile · Link to this post
How weird.  It looks like you have a few plugins installed, I wonder if that has anything to do with it.  Could you tell me what your PCRE config options are set to?
Avatar
jm_zz #22
Member since Aug 2007 · 104 posts · Location: labaquere momas france
Group memberships: Members
Show profile · Link to this post
This is a community's server from free.fr DSL service provider....
here the php.ini :

http://jeanmarcmassou.free.fr/dokuwiki/doku.php?id=php_info

I try to get the value of pcre.backtrack_limit and pcre.recursion_limit, with ini_get function.
but this version of php 5.1 doesn't support this directive (introduce by the 5.2 version of PHP).

So i think they are unlimited....

Here the default since 5.2 version :

Nom      Défaut      Modifiable      Changelog
pcre.backtrack_limit     100000     PHP_INI_ALL     Disponible depuis PHP 5.2.0.
pcre.recursion_limit     100000     PHP_INI_ALL     Disponible depuis PHP 5.2.0.
T'as avì dit, que n'i a pas nada estela. I a pas sonque lo movement deus astres e totas la causas. Lo mon còr ? Non. Son tremolar. Benard Manciet
Avatar
jm_zz #23
Member since Aug 2007 · 104 posts · Location: labaquere momas france
Group memberships: Members
Show profile · Link to this post
new test on other server with vs 5.2 of PHP :

PHP INFO

pcre.backtrack_limit = 100000 pcre.recursion_limit = 100000
PHP Logo
PHP Version 5.2.0

.... i can not parse your page on this server... so it is relative to 5.2 version of php .....



---- > after some googleing :

http://tracker.moodle.org/browse/MDL-11237


Proposal :

"It seems that, since 5.2.0 it's necessary to adjust the "pcre.backtrack_limit' setting to allow more chars to be returned (in ungreedy matches). So, something like:

 ini_set('pcre.backtrack_limit', 20971520); /// 20 MB

will allow up to 20MB of text to be matched."

More info : http://bugs.php.net/bug.php?id=40846
T'as avì dit, que n'i a pas nada estela. I a pas sonque lo movement deus astres e totas la causas. Lo mon còr ? Non. Son tremolar. Benard Manciet
This post was edited on 2008-03-07, 14:31 by jm_zz.
slack #24
Member for 3 months · 13 posts
Group memberships: Members
Show profile · Link to this post
Wow, that's a very comprehensive answer jm_zz.  In light of this PHP bug, do you think that dokuwiki ought to reset the PCRE limit, or at least offer an option to do so in the admin config?  Or should we just trust PHP to sort it out sooner or later?
Avatar
jm_zz #25
Member since Aug 2007 · 104 posts · Location: labaquere momas france
Group memberships: Members
Show profile · Link to this post
I think that's PHP developper knows what they do but the limit is too low... perhaps we could try to make a workaround on the next install.php of dokuwiki...
that will test version of PHP, and if it >= 5.2 then bring a warning on the 'pcre.backtrack_limit' ...
For the rest there is a stack overflow relative to this library... it is why they put this limits on pcre... and i don"t know if there is no regression on this implementation so ... wait to see, try to increase amount ... and vote on the bug tracker :

http://bugs.php.net/bug.php?id=40846

I build a small script to test this workaround with your test page :




<php>



list($major, $minor, $rev) = split('[\..-]', phpversion_real());
echo "Your PHP version is : Major: $major; Minor: $minor; Revision: $rev<br />\n";

if ($major >= 5 ) {
if ($minor >= 2 ) {
echo "You could have a problem in parsing large Dokuwiki Page.<br />\n";
$backtrap =  ini_get("pcre.backtrack_limit");
echo "Your php.ini pcre.backtrack_limit is : $backtrap<br />\n";

if  ($backtrap<=100000){
echo "Your pcre.backtrack_limit is too low, try to increase it to at least 20971520<br />\n";
}

if ($backtrap>=20971520){
echo "Your pcre.backtrack_limit seems to be in good order for a better DokuWiki experience<br />\n";
}


}}



   function phpversion_real()
    {
        $v = phpversion();
        $version = Array();

        foreach(explode('.', $v) as $bit)
        {
            if(is_numeric($bit))
            {
                $version[] = $bit;
            }
        }

        return(implode('.', $version));
    }
</php>


the full source with your test page could be copy from there :

http://jm.massou.free.fr/dokuwiki/doku.…?id=test_large_p…
T'as avì dit, que n'i a pas nada estela. I a pas sonque lo movement deus astres e totas la causas. Lo mon còr ? Non. Son tremolar. Benard Manciet
UnstoppableDrew #26
Member since Oct 2007 · 1 post
Group memberships: Members
Show profile · Link to this post
I seem to be having a similar but slightly different problem. We have a page that is 327 lines, 2618 words, 36226 characters according to wc. It just doesn't display at all. I see the head, end the button row, and the trace line, and thne just blank white space.

If I view page source, the last few lines are:
 
  <div class="page">
    <!-- wikipage start -->
   
I tried the suggestions above, increasing my pcre.backtrace_limit to 20MB, and that didn't help. Yes, I restarted apache after I changed it.

Any suggestions ?

Thanks,
   Drew
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please note the verification code from the picture into the text field next to it.
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page:  previous  1  2 
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 1.6.4, © 2003-7 by Yves Goergen
Current time: 2008-05-17, 04:09:28 (UTC +02:00)
WikiForumIRCBugsTranslate