Last modified: 2009-12-23 17:30:39 UTC
I'm trying to be 'organized' and share extensions between sites. To do this I created a new extensions directory one level below a particular MediaWiki install directory (i.e. "$IP/../MWExtensions"). To save too much confusion, I linked this directory from within the standard extensions directory. I then updated all my 'include_once' statements for all the extensions I use. For example: From: include_once("$IP/extensions/SemanticMediaWiki/includes/SMW_Settings.php"); To: include_once("$IP/extensions/MWExtensions/SemanticMediaWiki/includes/SMW_Settings.php"); Everything worked fine (all other extensions worked fine), except for SMW, which gave the following error: [Sun Dec 13 08:15:54 2009] [error] [client 77.103.200.41] PHP Warning: include_once(/BiO/Serve/Httpd/Funktopia.net/MW-1.15/extensions/SemanticMediaWiki/languages/SMW_LanguageEn.php) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: No such file or directory in /BiO/Serve/Httpd/Funktopia.net/MWExtensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php on line 417 [Sun Dec 13 08:15:54 2009] [error] [client 77.103.200.41] PHP Warning: include_once() [<a href='function.include'>function.include</a>]: Failed opening '/BiO/Serve/Httpd/Funktopia.net/MW-1.15/extensions/SemanticMediaWiki/languages/SMW_LanguageEn.php' for inclusion (include_path='/BiO/Serve/Httpd/Funktopia.net/MW-1.15:/BiO/Serve/Httpd/Funktopia.net/MW-1.15/includes:/BiO/Serve/Httpd/Funktopia.net/MW-1.15/languages:.:/usr/share/pear:/usr/share/php') in /BiO/Serve/Httpd/Funktopia.net/MWExtensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php on line 417 [Sun Dec 13 08:15:54 2009] [error] [client 77.103.200.41] PHP Fatal error: Class 'SMWLanguageEn' not found in /BiO/Serve/Httpd/Funktopia.net/MWExtensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php on line 420 DEBUGGING / PROPOSED FIX: Line 417 of "includes/SMW_GlobalFunctions.php" is: include_once($smwgIP . '/languages/SMW_LanguageEn.php'); and $smwgIP is set in "includes/SMW_Settings.php", line 32: $smwgIP = $IP . '/extensions/SemanticMediaWiki'; I changed the above line to: $smwgIP = dirname(__FILE__); and that seems to have done the trick.
Sorry, the above should read: I changed the above line to: $smwgIP = dirname(__FILE__) . '/..'; and that seems to have done the trick.
I have now imlemented the change as suggested. I vaguely recall that we have actually used dirname()-based paths initially, but that we stopped doing this based on some PHP problem. Let's see if any other problem reoccurs now.