On 29/11/2011 17:31, Daniel Friesen wrote:
On Tue, 29 Nov 2011 08:58:09 -0800, Gordon
Joly<gordon.joly(a)pobox.com>
wrote:
I have Mediawiki installation went from 1.17 through 1.18 RC1 and to
1.18 - no problems.
But another Mediawiki has had some problems going direct from 1.17 to
1.18 - I took out Recaptcha and now see this:
*Fatal error*: Cannot redeclare wfprofilein() (previously declared in
/xxxxxxxx/public_html/includes/profiler/Profiler.php:14) in
*/xxxxx/public_html/includes/ProfilerStub.php* on line *25*
Not sure why...
Gordo
Sounds like you upgraded MediaWiki by extracting 1.18 on top of 1.17
instead of extracting 1.18 to a new directory then moving the config and
other stuff to the new directory. And have an old StartProfiler.php.
includes/ProfilerStub.php was moved to includes/profiler/Profiler.php and
includes/profiler/ProfilerStub.php in 1.18
Basically what it looks like is happening is that you have a
includes/ProfilerStub.php file from 1.17 and includes/profiler/ from 1.18.
Because your StartProfiler.php likely uses the old method of a
require_once (instead of autoloading as I believe we now do) MediaWiki is
loading the 1.18 profiler code from includes/profiler/Profiler.php and
then when it require your StartProfiler.php that old require_once is
requiring the old 1.17 code from includes/ProfilerStub.php causing a fatal
error as the old code tries to redefine the same method.
If you don't need the profiler I recommend you delete your
StartProfiler.php. If you do you should probably delete the require_once
line.
You'd also probably be better off clearing out all the outdated files of
1.17 code that were left behind since you extracted 1.18 over top of 1.17.
Though the easiest way to do that is to just re-untar 1.18 in another
directory, and move your actual LocalSettings, extensions, images/, etc...
to there.
Yes, exactly. I could do that. But I follow the instructions below........
Trick - remove *Profile*.php in includes and the top level file....
>>
rm StartProfiler.php
rm ./includes/*Profile*.php
<<<
I extract the tar files over the old version (in fact I extract them and
make some minor changes and create a new tar). It is the method given on
the
Mediawiki.org webiste:
****
http://www.mediawiki.org/wiki/Manual:Upgrading
Using a tarball package
If you are using a tarball package
<http://www.mediawiki.org/wiki/Download>, decompress the file on the
server where the old version of mediawiki is running. You may need to
run the command as sudo if you don't have full write permissions to the
wiki install directories under your current user. When untarring a
tarball package normally a new directory for the new wiki version will
be created and you will have to copy the new files and directories to
your current wiki directory. Instead, to replace the existing files
while decompressing and do this in one step, use this command:
$ tar xvzf mediawiki-1.18.0.tar.gz -C /path/to/your/wiki/
--strip-components=1
****
YMMV,
Gordo
--
Gordon Joly
gordon.joly(a)pobox.com
http://www.joly.org.uk/
Don't Leave Space To The Professionals!