[pmwiki-users] Trying to revive an old wiki
5ko at 5ko.fr
Tue May 26 03:33:11 CDT 2015
There is a bug/feature with the function htmlspecialchars() in PHP 5.4
and newer. If the string to be converted contains invalid characters for
the charset, it returns blank. Moreover, the default_charset directive
changed from iso8859-1/cp1252, an 8 bit encoding where all characters
are valid, to UTF-8, a variable-bit encoding where some combinations of
characters are invalid.
So, the easiest fix is to set the "default_charset" directive in php.ini
to an 8-bit encoding like CP1252.
But in order to fix it for future compatibility, it is recommended, in
all your recipes and local customizations, to replace any call to
htmlspecialchars() with the core helper function PHSC() which takes care
of the problem.
On 2015-05-26 09:46, Anders Troberg wrote:
> I'm trying to revive a wiki from a server that died years ago
> (2.0, from 2005), so I can salvage some of the contents and put in my
> current wiki (2.2.72). I'm prepared to manually copy the topic text,
> it's a bit of work, but doable, it's only about 200 topics and maybe
> half of them is to be salvaged.
> So, I do this:
> 1. Copy the wiki to my new web server.
> 2. Set the apropriate permissions (all, as it's put on my internal
> network, so only I can reach it).
> 3. Log on to it.
> At this point, I expected to see the wiki. It's something I've done
> before with other wikis, and it's always worked.
> However, I find most topics empty. Only a few, maybe one in twenty,
> has any contents. If I look at the files in wiki.d, all the text is in
> there and looks OK. I can't find anything different between the
> working topics and the blank topics.
> Yikes! What's going on, and how do I fix it???
More information about the pmwiki-users