I facing problem when parsing MediaWiki result using php-pear in Ubuntu 11.10 ( Oneiric ). It give me error result like this :
1 2 3 4 | require_once(): Failed opening required ” Warning: require_once(Text/Wiki/Mediawiki.php): failed to open stream: No such file or directory in /usr/share/php/Text/Wiki.php on line 473 Fatal error: require_once(): Failed opening required ‘Text/Wiki/Mediawiki.php’ (include_path=’.:/usr/share/php:/usr/share/pear:/home/ubuntu/htdocs/…’) in /usr/share/php/Text/Wiki.php on line 473 |
It seems Text/Wiki/Mediawiki.php isn’t installed properly. I use this pear installation before :
1 | sudo pear install Text_Wiki Text_Wiki_Mediawiki |
Then after searching into “/usr/share/php/Text” and can’t find, I thing it because Text_Wiki_Mediawiki doesn’t installed properly.
So, I try with “sudo pear install Text_Wiki_Mediawiki” and got error like this :
1 2 | Failed to download pear/Text_Wiki_Mediawiki within preferred state "stable", latest release is version 0.2.0, stability "alpha", use "channel://pear.php.net/Text_Wiki_Mediawiki-0.2.0" to install install failed |
Now, I know the problem come from channel of TEXT_WIKI_MEDIAWIKI version. To solve this problem, we need to install using channel by :
1 | sudo pear install Text_Wiki_Mediawiki channel://pear.php.net/Text_Wiki_Mediawiki-0.2.0 |
Now all problem shall gone and I can parse Mediawiki result perfectly! 🙂