[Pmwiki-users] Restore problem

Patrick R. Michaud pmichaud at pobox.com
Thu Jul 3 09:06:07 CDT 2003

PmWiki uses the Unix diff(1) and patch(1) commands to build a page's
revision history, and it expects the programs to appear in /usr/bin/diff
and /usr/bin/patch.  If PmWiki is unable to access the diff(1) command
for any reason, then it's unable to compute the revision history and
the revisions all show up as blank (as in your example).

There are several reasons why this could be the case:
  - the PHP environment may be set to disallow execution of external
    programs such as diff(1) and patch(1)
  - the system you're on might not have diff(1) and patch(1) installed 
    (common under Windows systems)
  - diff(1) could be in a directory other than /usr/bin

I'm currently brainstorming ways to circumvent problems like these but
the solutions aren't trivial.  One solution would be to have PmWiki implement
its own version of the diff algorithm in PHP--alleviating the need for the
external program.  I've looked into this a little bit but haven't had a
good opportunity to make real progress on it.  If anyone knows of a PHP
implementation of diff it could be very helpful.

In the meantime I should probably work on improving the diagnostics and
messages for when PmWiki is unable to access the diff(1) program, so that
it gives a useful message ("unable to execute diff") rather than simply
showing blank revision histories.

All suggestions on this topic are greatly appreciated.


On Thu, Jul 03, 2003 at 03:55:21AM -0400, WANG Songtao wrote:
>    When performing Page Revisions, it shows like this:
> [1]Main.HomePage Revisions
>    July 03, 2003, at 03:35 PM
>    [2]Restore
>    July 03, 2003, at 03:17 PM
>    [3]Restore
>    July 03, 2003, at 03:16 PM
>    [4]Restore
>    July 03, 2003, at 03:15 PM
>    [5]Restore
>      _________________________________________________________________
>    Back to [6]Main.HomePage
>    But  clicking  on  any  Restore  button,  it  always displays the last
>    revision  with  no  restore  at  all.  What could be the cause of this
>    problem? Having tested on both 0.5.5 and 0.5.6.
>    Songtao Wang
>      _________________________________________________________________
>    No banners. No pop-ups. No kidding.
>    Introducing My Way - [7]http://www.myway.com
> References
>    1. http://dialogue.51.net/test/pmwiki.php/Main/HomePage
>    2. http://dialogue.51.net/test/pmwiki.php/Main/HomePage?action=edit&restore=diff:1057217715:1057216671
>    3. http://dialogue.51.net/test/pmwiki.php/Main/HomePage?action=edit&restore=diff:1057216671:1057216563
>    4. http://dialogue.51.net/test/pmwiki.php/Main/HomePage?action=edit&restore=diff:1057216563:1057216545
>    5. http://dialogue.51.net/test/pmwiki.php/Main/HomePage?action=edit&restore=diff:1057216545:1057216545
>    6. http://dialogue.51.net/test/pmwiki.php/Main/HomePage
>    7. http://www.myway.com/

More information about the pmwiki-users mailing list