I have de same problem:
Cannot redeclare wiki_add_instance() in /var/www/moodle/mod/wiki/lib.php on line 14
¿did you found the solution?
Thanks,
Floren
I'm having the same error - does anybody have a solution?
Thanks,
Charlie
could you provide some more info? (Moodle's version, full error, page showing the error, action that triggers it...)
TIA and ciao
Hi back Eloy,
I updated to the latest version about two weeks ago. I'm not sure what version that is and could not easilly find the version number.
Since the upgrade, none of my Wiki pages work. This includes both old and new pages.
The site is http://jelt.org
The error is:
Fatal error: Cannot redeclare wiki_add_instance() (previously declared in D:\inetpub\balch\md\mod\wiki\lib.php:14) in D:\Inetpub\balch\md\mod\wiki\lib.php on line 14
Could you try changing the capitalisation of your $CFG->dirroot setting from "Inetpub" to "inetpub" or vice-versa?
It seems that your Win32 box has some sort of problem, not detecting such paths as previously included. Strange...!
That's all I've been able to imagine (although it doesn't produce such result under my XP box).
Hope it helps, ciao
Thanks Eloy,
That sounds like it might be something that would help but I don't know where ot change my $CFG dirroot setting. I'm using a shared box which may be part of the problem. I also recently moved one shared server to another so the path may have changed spelling as you note.
Where do I change my $CFG settings?
Thanks,
Charlie
D:\inetpub\balch\md\config.php
and the line you've to change (the "i" of "inetpub" from lowercase to uppercase or the opposite) is that starting by:
$CFG->dirroot
Ciao
Many thanks Eloy! Your suggestion appears to have fixed the problem.
Charlie
Fatal error: Cannot redeclare wiki_add_instance() (previously declared in /usr/share/moodle/mod/wiki/lib.php:14) in /usr/share/moodle/mod/wiki/lib.php on line 14
It happens when trying to edit a wiki. You can create new wikis just fine, but you can't edit any. This happens for teachers, course creators, and admins. My config.php has this for my path:
$CFG->dirroot = '/usr/share/moodle';
I have another moodle installation that works just fine.
This is using ewiki.
I turned on debug mode and now get:
Notice: Constant EWIKI_ESCAPE_AT already defined in /usr/share/moodle/mod/wiki/lib.php on line 12
Fatal error: Cannot redeclare wiki_add_instance() (previously declared in /usr/share/moodle/mod/wiki/lib.php:14) in /usr/share/moodle/mod/wiki/lib.php on line 14
I went to Config->Filters and disabled Wiki Page Auto-Linking and now I can update my Wikis. I went to my other site and found this filter enabled, so it isn't the source of my problem.
Thanks again,
Matt
any PHP-acellerator running in your server? Could you delete its cache? It seems that the same file, "/usr/share/moodle/mod/wiki/lib.php" is being included twice, but all the includes I've found are include/require_once() so it shouldn't happen at all.
All I can imagine is that "something" has two versions of the same file and it's causing the error... but I'm not able to reproduce it in my server...
Ciao