From: Steven M. <st...@mu...> - 2001-10-06 15:28:22
|
At 20:11 04/10/01 -0700, Adam Shand wrote: >trying to remove a page fails with this error: > >Fatal error: Failed opening required 'lib/template.php' >(include_path='.:/var/lib/phpwiki-alpha') in >/var/lib/phpwiki-alpha/admin/removepage.php on line 19 > >and template really doesn't exist anywhere that i could see. updating >admin/removepage.php to point to Template.php fixes this but then it gets >caught in a loop and won't delete the page when you click "here". It was only after I sent in my own bug report that I noticed your mail, sorry for the duplicate. I know no PHP programming but it looks a bit like Perl and I know a little of that so I thought I'd give it a go. Like you I tried changing "template.php" to "Template.php" and I encountered the same problem as you have mentioned. As I said I know no PHP but this problems seems unconnected. In removepage.php there is an "if" statement to check whether the remove action has been verified, by checking whether the "verify=okay" parameter has been passed. It seems like the content of the verify parameter should go in $verify but when I checked, $verify was undefined so the remove is always seen to be unverified. Perhaps PHP is meant to automatically assign variable to parameters but my installation doesn't seem to. I tried adding in a line explicitly grab the contents of verify, and it seems to fix the problem (patch attached). It might not be the neatest way to do it but it works for me. Perhaps one of the developers will check it over and see if it is sane, or perhaps suggest a more elegant way to fix the problem. Hope this helps, Steven Murdoch. |