[pmwiki-users] Problem displaying MySQL queries

Petko Yotov 5ko at 5ko.fr
Fri Nov 18 04:32:29 CST 2011

On Friday 18 November 2011 08:55:57, Nicolas Poulain wrote :
> It confirms what I suspected : the problem doesn't seem to come from
> the MySQL part because all tests are succesfully passed and every line
> of the code returns the correct output in the headers of the page.
> But inside the html part, the wikitext div is still empty as if pmwiki
> refuses to process the wiki code while it's too big to display.
> So my question : is there a limit size for the strings returned by
> markup functions that could make pmwiki display everything but the
> wikitext content ?

There are no intentionally placed limits on the size of the wiki text, or of 
the output of a markup function. I have tested a markup producing huge output 
of 10+ megabytes -- at some point it will hit the PHP memory or time limit but 
I get a message telling me this.

If your output may be larger than 1 million bytes, and needs to be re-
processed by the markup engine, you may need to increase the runtime value of 
pcre.backtrack_limit. Something like this in config.php:

  @ini_set('pcre.backtrack_limit', 4000000); # 4MB

On some installations, this may not work in config.php and you can only add it 
in the php.ini file.

See http://fr.php.net/manual/en/pcre.configuration.php for more information.

Some custom markup may unintentionally wipe all page text, especially if you 
use it very early like at the 'fulltext' point. This can be tested by 
disabling custom markups or recipes one after another and refreshing the page, 
which at some point may appear correctly.


P.S. I would be very careful if had to allow SQL queries from a wiki page, and 
even more if I had to trust http variables inside my SQL queries (I don't):

More information about the pmwiki-users mailing list