Don't know what's with the Semantic extensions and the standards they
use that don't fit well with that used in most other extensions, but
I've changed those include paths now.
Me and Tim discussed a small standard for maintenance scripts including
commandLine.inc awhile ago which is perfectly reliable.
|require_once ( getenv('MW_INSTALL_PATH') !== false
? getenv('MW_INSTALL_PATH')."/maintenance/commandLine.inc"
: dirname( __FILE__ ) . '/../../maintenance/commandLine.inc' );|
(Note that for SMW because maintenance scripts are in a sub-subdir
that's actually /../../../ instead of just /../../)
You shouldn't be using include paths to guess where things are, it
restricts how things can be used. There are plenty who execute scripts
in $IP, some who execute in $IP/maintenance, and others who just run
them anywhere else. Running maintenance scripts shouldn't be dependent
on that.
This setup gives the largest amount of support.
If your installation of MediaWiki works with the standard
$IP/extensions/ExtensionName/... path then this will beautifully work no
matter where you are running the script from.
And if you aren't using the standard path, then you can simply set the
MW_INSTALL_PATH environment variable.
((Feel free to ignore the rest))
Trust me on this, it works beautifully. Personally, my server is setup
with a horrendously non-standard setup, full of symlinks and odd locations:
/var/www/mediawiki/sources/extensions-{1.12,alpha,dev}
Which are actually compilations of these directories which I build using
a special ~/mwman script
/var/www/mediawiki/sources/extensions-wikimedia-{1.12,alpha}
/var/www/mediawiki/sources/extensions-wikitools-{stable,alpha}
As for MediaWiki itself, I centralize them inside of:
/var/www/mediawiki/sources/mediawiki-{1.12,alpha}
And as for my websites:
/var/www/{com,org}//domainname//{/subdomainname/,www}/
For those that are wiki, the entire directory consists of nothing but a
few standard symlinks.
My actual configs lie in a maze inside of:
/var/www/mediawiki/sources/configs/PerWiki/domainname.tld/Sub.php
Which make use of a strong set of global scripts.
To top it all off I use a shared area for my images and even skins.
And everything is managed with that ~/mwman script, I have a special
create-wiki option that does absolutely everything.
And yes, that includes database creation, it runs update.php and many
maintenance scripts, those being installation scripts for the many
extensions my wiki are pre-installed with.
And all of this works fine. So trust me on non-standard stuff.
~Daniel Friesen(Dantman, Nadir-Seen-Fire) of:
-The Nadir-Point Group (http://nadir-point.com)
--It's Wiki-Tools subgroup (http://wiki-tools.com)
--The ElectronicMe project (http://electronic-me.org)
--Games-G.P.S. (http://ggps.org)
-And Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG)
--Animepedia (http://anime.wikia.com)
--Narutopedia (http://naruto.wikia.com)
The Gadget Doctor wrote:
> I used SVN today to upgrade to the latest build and want to upgrade to the
> new store so I followed the instructions below:
>
> (1) Login to your server, and change directory to [wikipath]/maintenance
>
> This is a little misleading, should be
> [wikipath]/extensions/SemanticMediaWiki/maintainance
>
> (2) Run php SMW_setup.php -b SMWSQLStore2 and follow its progress.
>
> This worked OK
>
> (3) Run php SMW_refreshData.php -tpv -b SMWSQLStore2 and follow its
> progress.
>
> This failed until I added the following line (copied from setup.php):
>
> set_include_path( get_include_path() . PATH_SEPARATOR . dirname(__FILE__) .
> '/../../../' . 'maintenance' );
>
> (4) Run php SMW_refreshData.php -v -b SMWSQLStore2 and follow its progress.
> This failed and I've reached the limit of my debugging skills. I have no
> idea why DPL2 php files are involved in this! Error message is below:
>
> [EMAIL PROTECTED] maintenance]$ php SMW_refreshData.php -v -b SMWSQLStore2
> PHP Warning: set_time_limit(): Cannot set time limit in safe mode in
> /var/www/vhosts/adv01.mysever.com/httpdocs/w/maintenance/commandLine.inc on
> line 238
>
> Selected storage SMWSQLStore2 for update!
>
> Refreshing all semantic data in the database!
> ---
> Some versions of PHP suffer from memory leaks in long-running scripts.
> If your machine gets very slow after many pages (typically more than
> 1000) were refreshed, please abort with CTRL-C and resume this script
> at the last processed page id using the parameter -s (use -v to display
> page ids during refresh). Continue this until all pages were refreshed.
> ---
> Processing pages from ID 0 to ID 144 ...
> (0) Processing page with ID 1 ...
> PHP Fatal error: Call to a member function getNamespace() on a non-object
> in /var/www/vhosts/
> adv01.myserver.com/httpdocs/w/extensions/DynamicPageList/DynamicPageList2.phpon
> line 3011
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Semediawiki-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Semediawiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel