Hello,
I had mediawiki 1.4.6 installed on a machine which just had the mediawiki directory hanging off the webserver documentroot. I moved this to a production server and onto a vhost and changed my LocalSettings.php over, but all my links are still broken and I'm not sure why.
I copied the database as per http://meta.wikimedia.org/wiki/ How_to_move_a_MediaWiki_Database without issue. I can get to the main page of my installation, no problem but whenever I try to click on any of the links which were copied with the database from the old server, the URL has /mediawiki in it, even though LocalSettings.php has: $wgScriptPath = "";. I'm somewhat stumped. From what I've read, it should be as easy as making sure the $wgScriptPath variable is set correctly, but I may be horribly wrong and there may be something else quite involved that I'm missing.
Any ideas?
cache. Run rebuildall.php.
On 7/19/05, Jason Lixfeld jason+lists.mediawiki@lixfeld.ca wrote:
Hello,
I had mediawiki 1.4.6 installed on a machine which just had the
mediawiki directory hanging off the webserver documentroot. I moved this to a production server and onto a vhost and changed my LocalSettings.php over, but all my links are still broken and I'm not sure why.
I copied the database as per http://meta.wikimedia.org/wiki/ How_to_move_a_MediaWiki_Database without issue. I can get to the main page of my installation, no problem but whenever I try to click on any of the links which were copied with the database from the old server, the URL has /mediawiki in it, even though LocalSettings.php has: $wgScriptPath = "";. I'm somewhat stumped. From what I've read, it should be as easy as making sure the $wgScriptPath variable is set correctly, but I may be horribly wrong and there may be something else quite involved that I'm missing.
Any ideas? _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Thanks for the tip, Jamie. That didn't appear to help though :(
# grep ^"$wgScriptPath" ../LocalSettings.php $wgScriptPath = ""; # php rebuildall.php ** Rebuilding fulltext search index (if you abort this will break searching; run this script again to fix): Dropping index... Rebuilding index fields for 946 pages... 0 500 Rebuild the index...
** Rebuilding recentchanges table: Loading from CUR table... Loading from OLD table... Updating links...
** Rebuilding links tables -- this can take a long time. It should be safe to about via ctrl+C if you get bored. Refreshing link table. Starting from cur_id 1 of 946. 100 200 300 400 500 600 700 800 900 Done. #
If I point a browser to the main page and click on any links off the main page, I still get a URL with /mediawiki in it:
https://wiki.ebit.ca:443/mediawiki/index.php/EBit_Networks
Am I running the script incorrectly? I put my mysql root user and password in the AdminSettings.php to be on the safe side incase the other user didn't have the access.
On 19-Jul-05, at 12:09 PM, Jamie Bliss wrote:
cache. Run rebuildall.php.
On 7/19/05, Jason Lixfeld jason+lists.mediawiki@lixfeld.ca wrote:
Hello,
I had mediawiki 1.4.6 installed on a machine which just had the
mediawiki directory hanging off the webserver documentroot. I moved this to a production server and onto a vhost and changed my LocalSettings.php over, but all my links are still broken and I'm not sure why.
I copied the database as per http://meta.wikimedia.org/wiki/ How_to_move_a_MediaWiki_Database without issue. I can get to the main page of my installation, no problem but whenever I try to click on any of the links which were copied with the database from the old server, the URL has /mediawiki in it, even though LocalSettings.php has: $wgScriptPath = "";. I'm somewhat stumped. From what I've read, it should be as easy as making sure the $wgScriptPath variable is set correctly, but I may be horribly wrong and there may be something else quite involved that I'm missing.
Any ideas? _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
--
http://endeavour.zapto.org/astro73/ Thank you to JosephM for inviting me to Gmail! Have lots of invites. Gmail now has 2GB. _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
in localsettings.php, add this: die('This is localsettings.php with no scriptpath in it');
When you go to any page on your wiki, it should print that message and no more. (remove it when you're done.)
If this doesn't happen, it means you're using a different localsettings.php.
On 7/19/05, Jason Lixfeld jason+lists.mediawiki@lixfeld.ca wrote:
Thanks for the tip, Jamie. That didn't appear to help though :(
# grep ^"$wgScriptPath" ../LocalSettings.php $wgScriptPath = ""; # php rebuildall.php ** Rebuilding fulltext search index (if you abort this will break searching; run this script again to fix): Dropping index... Rebuilding index fields for 946 pages... 0 500 Rebuild the index...
** Rebuilding recentchanges table: Loading from CUR table... Loading from OLD table... Updating links...
** Rebuilding links tables -- this can take a long time. It should be safe to about via ctrl+C if you get bored. Refreshing link table. Starting from cur_id 1 of 946. 100 200 300 400 500 600 700 800 900 Done. #
If I point a browser to the main page and click on any links off the main page, I still get a URL with /mediawiki in it:
https://wiki.ebit.ca:443/mediawiki/index.php/EBit_Networks
Am I running the script incorrectly? I put my mysql root user and password in the AdminSettings.php to be on the safe side incase the other user didn't have the access.
On 19-Jul-05, at 12:09 PM, Jamie Bliss wrote:
cache. Run rebuildall.php.
On 7/19/05, Jason Lixfeld jason+lists.mediawiki@lixfeld.ca wrote:
Hello,
I had mediawiki 1.4.6 installed on a machine which just had the
mediawiki directory hanging off the webserver documentroot. I moved this to a production server and onto a vhost and changed my LocalSettings.php over, but all my links are still broken and I'm not sure why.
I copied the database as per http://meta.wikimedia.org/wiki/ How_to_move_a_MediaWiki_Database without issue. I can get to the main page of my installation, no problem but whenever I try to click on any of the links which were copied with the database from the old server, the URL has /mediawiki in it, even though LocalSettings.php has: $wgScriptPath = "";. I'm somewhat stumped. From what I've read, it should be as easy as making sure the $wgScriptPath variable is set correctly, but I may be horribly wrong and there may be something else quite involved that I'm missing.
Any ideas? _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
--
http://endeavour.zapto.org/astro73/ Thank you to JosephM for inviting me to Gmail! Have lots of invites. Gmail now has 2GB. _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
I get the error message, so I'm using the LocalSettings.php.
On 19-Jul-05, at 10:28 PM, Jamie Bliss wrote:
in localsettings.php, add this: die('This is localsettings.php with no scriptpath in it');
When you go to any page on your wiki, it should print that message and no more. (remove it when you're done.)
If this doesn't happen, it means you're using a different localsettings.php.
On 7/19/05, Jason Lixfeld jason+lists.mediawiki@lixfeld.ca wrote:
Thanks for the tip, Jamie. That didn't appear to help though :(
# grep ^"$wgScriptPath" ../LocalSettings.php $wgScriptPath = ""; # php rebuildall.php ** Rebuilding fulltext search index (if you abort this will break searching; run this script again to fix): Dropping index... Rebuilding index fields for 946 pages... 0 500 Rebuild the index...
** Rebuilding recentchanges table: Loading from CUR table... Loading from OLD table... Updating links...
** Rebuilding links tables -- this can take a long time. It should be safe to about via ctrl+C if you get bored. Refreshing link table. Starting from cur_id 1 of 946. 100 200 300 400 500 600 700 800 900 Done. #
If I point a browser to the main page and click on any links off the main page, I still get a URL with /mediawiki in it:
https://wiki.ebit.ca:443/mediawiki/index.php/EBit_Networks
Am I running the script incorrectly? I put my mysql root user and password in the AdminSettings.php to be on the safe side incase the other user didn't have the access.
On 19-Jul-05, at 12:09 PM, Jamie Bliss wrote:
cache. Run rebuildall.php.
On 7/19/05, Jason Lixfeld jason+lists.mediawiki@lixfeld.ca wrote:
Hello,
I had mediawiki 1.4.6 installed on a machine which just had
the mediawiki directory hanging off the webserver documentroot. I moved this to a production server and onto a vhost and changed my LocalSettings.php over, but all my links are still broken and I'm not sure why.
I copied the database as per http://meta.wikimedia.org/wiki/ How_to_move_a_MediaWiki_Database without issue. I can get to the main page of my installation, no problem but whenever I try to click on any of the links which were copied with the database from the old server, the URL has /mediawiki in it, even though LocalSettings.php has: $wgScriptPath = "";. I'm somewhat stumped. From what I've read, it should be as easy as making sure the $wgScriptPath variable is set correctly, but I may be horribly wrong and there may be something else quite involved that I'm missing.
Any ideas? _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
--
http://endeavour.zapto.org/astro73/ Thank you to JosephM for inviting me to Gmail! Have lots of invites. Gmail now has 2GB. _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
--
http://endeavour.zapto.org/astro73/ Thank you to JosephM for inviting me to Gmail! Have lots of invites. Gmail now has 2GB. _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Hey folks,
Anyone have any more ideas here, by chance? I'd like to try to avoid redoing the installation from scratch if possible! I'm kinda stumped! :(
On 19-Jul-05, at 10:36 PM, Jason Lixfeld wrote:
I get the error message, so I'm using the LocalSettings.php.
On 19-Jul-05, at 10:28 PM, Jamie Bliss wrote:
in localsettings.php, add this: die('This is localsettings.php with no scriptpath in it');
When you go to any page on your wiki, it should print that message and no more. (remove it when you're done.)
If this doesn't happen, it means you're using a different localsettings.php.
On 7/19/05, Jason Lixfeld jason+lists.mediawiki@lixfeld.ca wrote:
Thanks for the tip, Jamie. That didn't appear to help though :(
# grep ^"$wgScriptPath" ../LocalSettings.php $wgScriptPath = ""; # php rebuildall.php ** Rebuilding fulltext search index (if you abort this will break searching; run this script again to fix): Dropping index... Rebuilding index fields for 946 pages... 0 500 Rebuild the index...
** Rebuilding recentchanges table: Loading from CUR table... Loading from OLD table... Updating links...
** Rebuilding links tables -- this can take a long time. It should be safe to about via ctrl+C if you get bored. Refreshing link table. Starting from cur_id 1 of 946. 100 200 300 400 500 600 700 800 900 Done. #
If I point a browser to the main page and click on any links off the main page, I still get a URL with /mediawiki in it:
https://wiki.ebit.ca:443/mediawiki/index.php/EBit_Networks
Am I running the script incorrectly? I put my mysql root user and password in the AdminSettings.php to be on the safe side incase the other user didn't have the access.
On 19-Jul-05, at 12:09 PM, Jamie Bliss wrote:
cache. Run rebuildall.php.
On 7/19/05, Jason Lixfeld jason+lists.mediawiki@lixfeld.ca wrote:
Hello,
I had mediawiki 1.4.6 installed on a machine which just
had the mediawiki directory hanging off the webserver documentroot. I moved this to a production server and onto a vhost and changed my LocalSettings.php over, but all my links are still broken and I'm not sure why.
I copied the database as per http://meta.wikimedia.org/wiki/ How_to_move_a_MediaWiki_Database without issue. I can get to the main page of my installation, no problem but whenever I try to click on any of the links which were copied with the database from the old server, the URL has /mediawiki in it, even though LocalSettings.php has: $wgScriptPath = "";. I'm somewhat stumped. From what I've read, it should be as easy as making sure the $wgScriptPath variable is set correctly, but I may be horribly wrong and there may be something else quite involved that I'm missing.
Any ideas? _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
--
http://endeavour.zapto.org/astro73/ Thank you to JosephM for inviting me to Gmail! Have lots of invites. Gmail now has 2GB. _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
--
http://endeavour.zapto.org/astro73/ Thank you to JosephM for inviting me to Gmail! Have lots of invites. Gmail now has 2GB. _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Jamie Bliss wrote:
cache. Run rebuildall.php.
rebuildall.php would not help in this situation.
Old URLs still in the parser cache can be cleared by:
DELETE * FROM objectcache;
to clear the objectcache table in MySQL.
Note that the browser cache may still contain bogus data. You can use ?action=purge on indidivual pages to update their cache dates. Also there is a global $wgCacheEpoch variable which can be set in LocalSettings.php to invalidate all prior cache entries (see DefaultSettings.php).
-- brion vibber (brion @ pobox.com)
That seems to have done the trick, thanks!
I cleared the objectcache. didn't help.
I set the $wgCacheEpoch, cleared the cache in my browser and that fixed it.
On 21-Jul-05, at 11:19 AM, Brion Vibber wrote:
Jamie Bliss wrote:
cache. Run rebuildall.php.
rebuildall.php would not help in this situation.
Old URLs still in the parser cache can be cleared by:
DELETE * FROM objectcache;
to clear the objectcache table in MySQL.
Note that the browser cache may still contain bogus data. You can use ?action=purge on indidivual pages to update their cache dates. Also there is a global $wgCacheEpoch variable which can be set in LocalSettings.php to invalidate all prior cache entries (see DefaultSettings.php).
-- brion vibber (brion @ pobox.com) _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
On Thu, Jul 21, 2005 at 05:19:24PM +0200, Brion Vibber wrote:
Old URLs still in the parser cache can be cleared by:
DELETE * FROM objectcache;
to clear the objectcache table in MySQL.
Note that the browser cache may still contain bogus data. You can use ?action=purge on indidivual pages to update their cache dates. Also there is a global $wgCacheEpoch variable which can be set in LocalSettings.php to invalidate all prior cache entries (see DefaultSettings.php).
I had the same problem as the OP, and setting wgCacheEpoch did not seem to work for me (or maybe its effect was only delayed, due to some timezone issue...). As my wiki is quite small, I wrote a script to request all wiki pages with ?action=purge.
In a nutshell, the following commands should do the trick:
host=http://wiki.my.org wiki=/wiki/
wget -qO- "${host}${wiki}Special:Allpages" | sed -re '/start content/,/end content/p' -e 's/href="([^"]+)"/\nGREPME:\1\n/g' | sed -nre 's/^GREPME:(.*)$/\1/p' | grep "^${wiki}" | while read page do wget -O/dev/null "${host}${page}?action=purge" done
Here is the complete script, with some boilerplate command line processing.
#! /bin/bash # mwpurgecache - invalidate mediawiki cache
set -e
PROG=$(basename $0) VER=0.1
function version() { echo "$PROG $VER - invalidate mediawiki cache Copyright (c) 2005 Claudio Jolowicz claudio@jolowicz.com
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This programs comes with ABSOLUTELY NO WARRANTEE. " }
function usage() { version echo "Syntax: $PROG [options] [--] [pages]
Options:
-H, --host host name (default: localhost) -w, --wiki WIKI server path to wiki (default: /wiki/) -u, --user USER username for HTTP authentication -p, --passwd PASS password for HTTP authentication -d, --dryrun show commands without executing them -q, --quiet quiet (no output) -v, --verbose be verbose (print server response) -h, --help display this message -V, --version display version information
Options and arguments must be separated by whitespace. WIKI must match wgArticlePath, such that $wgArticlePath = "WIKI/$1". WIKI must not contain regex special characters.
This script requests all wiki pages listed on the command line by HTTP, prefixed by the wiki path, appending `?action=purge' to the URL. If no pages are specified, it retrieves the list of all pages from Special:Allpages.
Examples:
$ $PROG Main_page Help:Contents $ $PROG -H wiki.my.org -w /mediawiki -u joe -p banana $ $PROG -H wiki.my.org --dryrun | wc -l " }
## The '-e#' is a noop option to avoid `Unsupported scheme' errors. user='-e#' passwd='-e#' run= verbose=-nv quiet='-e#'
opt_host=http://localhost opt_wiki=/wiki/ opt_user= opt_passwd= opt_dryrun=false opt_quiet=false opt_verbose=false while [ "$1" ] do case "$1" in -H|--host) opt_host="$2"; shift;; -w|--wiki) opt_wiki="$2"; shift;; -u|--user) opt_user="$2"; shift;; -p|--passwd) opt_passwd="$2"; shift;; -d|--dryrun) opt_dryrun=true;; -q|--quiet) opt_quiet=true;; -v|--verbose) opt_verbose=true;; -h|--help) usage; exit 0;; -V|--version) version; exit 0;; --) shift; break;; -*) usage 2>&1; exit 1;; *) break;; esac shift done opt_host=${opt_host%/} opt_wiki=/${opt_wiki#/} opt_wiki=${opt_wiki%/}/ [ x"$opt_user" = x"" ] || user="--http-user=${opt_user}" [ x"$opt_passwd" = x"" ] || passwd="--http-passwd=${opt_passwd}" $opt_dryrun && run=echo $opt_verbose && verbose="--server-response" $opt_quiet && quiet="-q" ( if [ $# -eq 0 ]; then wget -qO- "$user" "$passwd" "${opt_host}${opt_wiki}Special:Allpages" | sed -re '/start content/,/end content/p' -e 's/href="([^"]+)"/\nGREPME:\1\n/g' | sed -nre 's/^GREPME:(.*)$/\1/p' | grep "^${opt_wiki}" else for page; do echo "${opt_wiki}${page}"; done fi ) | while read page do $run wget -O/dev/null "$user" "$passwd" "$quiet" "$verbose" "${opt_host}${page}?action=purge" done
exit 0
Claudio Jolowicz wrote:
I had the same problem as the OP, and setting wgCacheEpoch did not seem to work for me (or maybe its effect was only delayed, due to some timezone issue...).
Can you be more specific about what you tried and what failed? Unless you're using the squid mode and a reverse caching proxy, updating $wgCacheEpoch should *always* clear all parser-cached items immediately and invalidate any browser-local cached pages.
(If you are using the squid mode and a caching reverse proxy, then you must issue explicit PURGE requests to the proxy or manually clear it as well.)
Note that timestamps are always in UTC (*NOT* local time) and should be in YYYYMMDDHHMMSS format, as a 14-character string.
-- brion vibber (brion @ pobox.com)
mediawiki-l@lists.wikimedia.org