01 March 2013

Moving Pukiwiki on PHP 5.4.6

source

The frontpage was blank, I thought I was doing something wrong with my website settings.
But turns out pukiwiki wasn't working well on php 5.4 without changes.
It can be seen on the blog above, I'll rewrite it again here:

1. lib/func.php
Comment out bin2hex() function
// Inversion of bin2hex()
/* 
function hex2bin($hex_string)
{
// preg_match : Avoid warning : pack(): Type H: illegal hex digit ...
// (string) : Always treat as string (not int etc). See BugTrack2/31
return preg_match('/^[0-9a-f]+$/i', $hex_string) ?
pack('H*', (string)$hex_string) : $hex_string;
}
*/


2. plugin/ls2.inc.php
array_walk($args, 'plugin_ls2_check_arg', & $params);
to
array_walk($args, 'plugin_ls2_check_arg', $params);

It already worked at this stage, but just in case, I also did this

3. lib/convert_html.php, lib/link.php, lib/init.php
change all & new to new

When moving pukiwiki to a new server, need to do:
chmod 666 *
chown username:username *

for wiki/ backup/ diff/

No comments:

Post a Comment