PukiWiki r1.4.7_notb に PHP 5.4 対応パッチを当てる。
既に稼働している PukiWiki 1.4.7 利用サイトを PHP 5.4 対応にする手順の説明です。この操作を「PHP5.4対応パッチを当てる」と呼びます。
patchコマンドを使うことにより、PukiWikiをでカスタマイズしていても、PHP5.4対応にすることができます。
umorigu@UMORIGUPC ~/Documents/pw/pwc/packages $ cd my_pukiwiki_files_utf8/ umorigu@UMORIGUPC ~/Documents/pw/pwc/packages/my_pukiwiki_files_utf8 $ patch -p1 < ../pw_147to150_utf8.patch patching file `INSTALL.txt' patching file `README.txt' patching file `lib/auth.php' patching file `lib/backup.php' patching file `lib/convert_html.php' patching file `lib/diff.php' patching file `lib/file.php' patching file `lib/func.php' patching file `lib/html.php' patching file `lib/init.php' patching file `lib/link.php' patching file `lib/make_link.php' patching file `lib/plugin.php' patching file `lib/pukiwiki.php' patching file `plugin/amazon.inc.php' patching file `plugin/aname.inc.php' patching file `plugin/article.inc.php' patching file `plugin/attach.inc.php' patching file `plugin/back.inc.php' patching file `plugin/backup.inc.php' patching file `plugin/bugtrack.inc.php' patching file `plugin/calendar.inc.php' patching file `plugin/calendar2.inc.php' patching file `plugin/calendar_viewer.inc.php' patching file `plugin/color.inc.php' patching file `plugin/comment.inc.php' patching file `plugin/diff.inc.php' patching file `plugin/edit.inc.php' patching file `plugin/freeze.inc.php' patching file `plugin/include.inc.php' patching file `plugin/includesubmenu.inc.php' patching file `plugin/insert.inc.php' patching file `plugin/interwiki.inc.php' patching file `plugin/lookup.inc.php' patching file `plugin/ls2.inc.php' patching file `plugin/map.inc.php' patching file `plugin/md5.inc.php' patching file `plugin/memo.inc.php' patching file `plugin/menu.inc.php' patching file `plugin/navi.inc.php' patching file `plugin/new.inc.php' patching file `plugin/newpage.inc.php' patching file `plugin/online.inc.php' patching file `plugin/paint.inc.php' patching file `plugin/pcomment.inc.php' patching file `plugin/popular.inc.php' patching file `plugin/random.inc.php' patching file `plugin/read.inc.php' patching file `plugin/recent.inc.php' patching file `plugin/ref.inc.php' patching file `plugin/referer.inc.php' patching file `plugin/related.inc.php' patching file `plugin/rename.inc.php' patching file `plugin/ruby.inc.php' patching file `plugin/search.inc.php' patching file `plugin/setlinebreak.inc.php' patching file `plugin/showrss.inc.php' patching file `plugin/source.inc.php' patching file `plugin/stationary.inc.php' patching file `plugin/template.inc.php' patching file `plugin/topicpath.inc.php' patching file `plugin/tracker.inc.php' patching file `plugin/unfreeze.inc.php' patching file `plugin/versionlist.inc.php' patching file `plugin/vote.inc.php' patching file `plugin/yetlist.inc.php' patching file `skin/tdiary.skin.php' umorigu@UMORIGUPC ~/Documents/pw/pwc/packages/my_pukiwiki_files_eucjp $
umorigu@UMORIGUPC ~/Documents/pw/pwc/packages $ cd my_pukiwiki_files_eucjp/ umorigu@UMORIGUPC ~/Documents/pw/pwc/packages/my_pukiwiki_files_eucjp $ ls COPYING.txt attach en.lng.php plugin INSTALL.txt backup image pukiwiki.ini.php README.en.txt.zip cache index.php rules.ini.php README.txt counter ja.lng.php skin UPDATING.en.txt.zip default.ini.php keitai.ini.php trackback UPDATING.txt diff lib wiki umorigu@UMORIGUPC ~/Documents/pw/pwc/packages/my_pukiwiki_files_eucjp $ patch -p1 < ../pw_147to150_eucjp.patch patching file `INSTALL.txt' patching file `README.txt' patching file `lib/auth.php' patching file `lib/backup.php' patching file `lib/convert_html.php' patching file `lib/diff.php' patching file `lib/file.php' patching file `lib/func.php' patching file `lib/html.php' patching file `lib/init.php' patching file `lib/link.php' patching file `lib/make_link.php' patching file `lib/plugin.php' patching file `lib/pukiwiki.php' patching file `plugin/amazon.inc.php' patching file `plugin/aname.inc.php' patching file `plugin/article.inc.php' patching file `plugin/attach.inc.php' patching file `plugin/back.inc.php' patching file `plugin/backup.inc.php' patching file `plugin/bugtrack.inc.php' patching file `plugin/calendar.inc.php' patching file `plugin/calendar2.inc.php' patching file `plugin/calendar_viewer.inc.php' patching file `plugin/color.inc.php' patching file `plugin/comment.inc.php' patching file `plugin/diff.inc.php' patching file `plugin/edit.inc.php' patching file `plugin/freeze.inc.php' patching file `plugin/include.inc.php' patching file `plugin/includesubmenu.inc.php' patching file `plugin/insert.inc.php' patching file `plugin/interwiki.inc.php' patching file `plugin/lookup.inc.php' patching file `plugin/ls2.inc.php' patching file `plugin/map.inc.php' patching file `plugin/md5.inc.php' patching file `plugin/memo.inc.php' patching file `plugin/menu.inc.php' patching file `plugin/navi.inc.php' patching file `plugin/new.inc.php' patching file `plugin/newpage.inc.php' patching file `plugin/online.inc.php' patching file `plugin/paint.inc.php' patching file `plugin/pcomment.inc.php' patching file `plugin/popular.inc.php' patching file `plugin/random.inc.php' patching file `plugin/read.inc.php' patching file `plugin/recent.inc.php' patching file `plugin/ref.inc.php' patching file `plugin/referer.inc.php' patching file `plugin/related.inc.php' patching file `plugin/rename.inc.php' patching file `plugin/ruby.inc.php' patching file `plugin/search.inc.php' patching file `plugin/setlinebreak.inc.php' patching file `plugin/showrss.inc.php' patching file `plugin/source.inc.php' patching file `plugin/stationary.inc.php' patching file `plugin/template.inc.php' patching file `plugin/topicpath.inc.php' patching file `plugin/tracker.inc.php' patching file `plugin/unfreeze.inc.php' patching file `plugin/versionlist.inc.php' patching file `plugin/vote.inc.php' patching file `plugin/yetlist.inc.php' patching file `skin/tdiary.skin.php'
PukiWiki自体をカスタマイズして運用している場合、一部のパッチ当てに失敗することがあります。(コンフリクト)
patch コマンドの出力をチェックし、パッチ当てに失敗した個所では手動で編集を行います。