| | |
Fatal error: Class 'cite' not found
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Nov 2009
Posts: 3
Reputation:
Solved Threads: 0
Greetings! I'm developing my own wiki and installed v1.6.5. I use MySQL v5.0.83. The wiki itself functions fine but after adding the extension Cite.php and adding the call command
From my research this is failing to call Cite.php from itself which sounds impossible. Truly at a loss here.
Cite.php:
require_once( "$IP/extensions/Cite/Cite.php"); it gives me the stubborn fatal error message Fatal error: Class 'Cite' not found in $IP/wiki/extensions/Cite/Cite.php on line 54.From my research this is failing to call Cite.php from itself which sounds impossible. Truly at a loss here.
Cite.php:
PHP Syntax (Toggle Plain Text)
<?php if ( ! defined( 'MEDIAWIKI' ) ) die(); /**#@+ * A parser extension that adds two tags, <ref> and <references> for adding * citations to pages * * @addtogroup Extensions * * @link http://www.mediawiki.org/wiki/Extension:Cite/Cite.php Documentation * * @bug 4579 * * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com> * @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later */ if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { $wgHooks['ParserFirstCallInit'][] = 'wfCite'; } else { $wgExtensionFunctions[] = 'wfCite'; } $wgExtensionCredits['parserhook'][] = array( 'path' => __FILE__, 'name' => 'Cite', 'author' => 'Ævar Arnfjörð Bjarmason', 'description' => 'Adds <nowiki><ref[ name=id]></nowiki> and <nowiki><references/></nowiki> tags, for citations', // kept for b/c 'descriptionmsg' => 'cite_desc', 'url' => 'http://www.mediawiki.org/wiki/Extension:Cite/Cite.php' ); $wgParserTestFiles[] = dirname( __FILE__ ) . "/citeParserTests.txt"; $wgExtensionMessagesFiles['Cite'] = dirname( __FILE__ ) . "/Cite.i18n.php"; $wgAutoloadClasses['Cite'] = dirname( __FILE__ ) . "/Cite_body.php"; $wgSpecialPageGroups['Cite'] = 'pagetools'; define( 'CITE_DEFAULT_GROUP', ''); /** * The emergency shut-off switch. Override in local settings to disable * groups; or remove all references from this file to enable unconditionally */ $wgAllowCiteGroups = true; /** * An emergency optimisation measure for caching cite <references /> output. */ $wgCiteCacheReferences = false; function wfCite() { new Cite; return true; } /**#@-*/
0
#2 Nov 11th, 2009
The line:
means that there needs to be a class called Cite, not a file called Cite.php. Even if there was a Cite class, the code in the wfCite function wouldn't need that line as it doesn't reference the object after that. Remove that line and your code should be fine.
php Syntax (Toggle Plain Text)
new Cite;
There are no stupid questions, only those too stupid to ask for help.
echo is a web developer's best friend. •
•
Join Date: Nov 2009
Posts: 3
Reputation:
Solved Threads: 0
0
#3 Nov 11th, 2009
tried it. Removed
The line error is actually being returned as Line 51 - which is
new Cite; and the page loads but it fails to do anything when I put in the <ref></ref><references /> tags. It must be trying to create the Cite class for use with further handling.The line error is actually being returned as Line 51 - which is
new Cite; I just don't know what to do about it. Last edited by newtodaniweb; Nov 11th, 2009 at 3:25 am.
•
•
Join Date: Nov 2009
Posts: 3
Reputation:
Solved Threads: 0
0
#4 Nov 11th, 2009
I fixed it - incompatible version of cite.php for Mediawiki 1.6.5 I was ahead of the game. Anyone with this problem follow the instructions here http://www.ipbwiki.com/forums/index....ds&showfile=71
![]() |
Similar Threads
- Class mysqli not find (PHP)
- grab yahoo,hotmail,gmail Address book (PHP)
- SQLiteDatabase Error ...! (PHP)
- Fatal Error Class not found, help (PHP)
- Display values in listbox from db table regarding selected item in listbox? (PHP)
- PEAR email (PHP)
- Parse Error? (PHP)
- TChart - [Fatal Error] File not found: TeeConst.pas (Pascal and Delphi)
- connecting to DB (PHP)
Other Threads in the PHP Forum
- Previous Thread: textarea count commas.
- Next Thread: header problem
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl data database date directory display download duplicates dynamic echo email error execution file files folder foreach form forms function functions google href htaccess html htmlspecialchars image include insert integration ip java javascript joomla limit link links login loop mail menu mlm mod_rewrite multiple mysql oop parse paypal pdf php phpvotingscript problem query radio random recursion regex remote replace script search server session sessions sms soap source space sql structure syntax system table tutorial update upload url validation validator variable video volume web xml youtube





