Last modified: 2009-12-23 17:30:39 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T23832, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21832 - smwgIP is hard coded for the $IP . '/extensions' directory
smwgIP is hard coded for the $IP . '/extensions' directory
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Markus Krötzsch
:
Depends on:
Blocks: 21833 21835
  Show dependency treegraph
 
Reported: 2009-12-13 00:04 UTC by Dan Bolser
Modified: 2009-12-23 17:30 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Dan Bolser 2009-12-13 00:04:53 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.
Comment 1 Dan Bolser 2009-12-13 00:21:23 UTC
Sorry, the above should read:

I changed the above line to:
    $smwgIP = dirname(__FILE__) . '/..';

and that seems to have done the trick.
Comment 2 Markus Krötzsch 2009-12-23 17:30:39 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links