[RESOLVED] Profiler.php Fatal Error Cannot redeclare wfprofilein()

Jump to: navigation, search

I just upgraded the files from 1.17.0 to 1.18.0 and after doing so:

Fatal error: Cannot redeclare wfprofilein() (previously declared in /homepages/2/d276811108/htdocs/w/includes/profiler/Profiler.php:14) in /homepages/2/d276811108/htdocs/w/includes/Profiler.php on line 19

I tried the upgrade on my test install it worked fine. I have no idea what is wrong.

Also PHP is version 5.2.17 (cgi)and MySQL is version 5.0.91-log.

Calebrw04:53, 3 December 2011

Have you checked your extensions to see if they're updated? I believe Cite and a few others must be downloaded from the REL1_18 area as the trunk is now working on MW1.19. I seem to recall running into that error on an upgrade and it having to do with Cite or another common extension.

Varnent06:06, 3 December 2011
 

I've also just upgraded from 1.17.0 to 1.18.0 and have the same problem (on a diff line 24 not 19), I tried disabling all extensions but no luck

Fatal error: Cannot redeclare wfProfileIn() (previously declared in /includes/profiler/Profiler.php:14) in /includes/ProfilerStub.php on line 24

Unibond13:33, 3 December 2011
 
I'm seeing wfProfileIn errors after upgrading.
Try creating a file at includes/ProfilerStub.php with the following line:
<?php require_once( "$IP/includes/profiler/ProfilerStub.php" );

(From: MediaWiki_roadmap/1.18/FAQ)

wargo13:44, 3 December 2011

I found a file in the mediawiki root folder called StartProfiler.php and deleted it, so far so good, all seems to be working :-)

Unibond13:49, 3 December 2011

I'd be careful deleting core files rather than tracking down the core problem. If for no other reason than whatever is causing the error probably isn't working now anyway and is likely to unnecessarily drain your resources. A good strategy is to disable your extensions one by one (or groups at a time if you have a lot) to locate the source of the problem. Then try downloading the release branch version of that extension, and if still no luck, the trunk release. While some developers only use the trunk release directory, others are already using it to test MW1.19, which is causing problems on MW1.18 installs using SVN to pull from the trunk.

Varnent19:36, 3 December 2011

StartProfiler.php isn't a core file, it is created by the sysadmin if it is needed. A StartProfiler.sample is included, which can be copied to StartProfiler.php. Due to changes in 1.18, a StartProfiler.php from a previous version will be incompatible. StartProfiler.sample was updated, but StartProfiler.php couldn't be updated because it doesn't exist in the distribution.

StartProfiler.php is the core problem. Deleting it gets rid of that problem.

Reach Out to the Truth22:50, 3 December 2011

Thanks for this fix. I completely forgot about that. I had it enabled while trying to fix another problem. Eitherway, it's time to update my extensions.

Calebrw07:37, 4 December 2011

ditto on thanks for the fix. Renamed my StartProfiler.php to .old and the upgrade went as planned afterwards.

-Kevin

67.210.162.19417:37, 5 December 2011

This works. I renamed startProfiler.php to StartProfiler.php.broke.web.site because my wiki did not work after upgrading from version 18.0 to 18.2 via the Softaculous installer. Then the self-upgrade link worked. Good job.

96.240.15.13801:21, 2 April 2012

Thanks. Had the same issue with an upgrade from 1.15 to 1.20. Renamed the StartProfiler.php file and everything works great.

67.78.138.8220:49, 11 January 2013

I had the same problem upgrading from 1.17-1.20. Now works.

195.80.111.23412:15, 10 May 2013
 
 
 
 
 
 

Fixed it for me! Thanks!

74.57.210.817:19, 15 September 2013

Cool thnx, it also worked for me to get rid of the StartProfiler.php by renaming it to something else :)

Esenabre (talk)21:48, 19 January 2014

It would be easier to throw in an empty "startprofiler.php" file in the release. david

132.72.73.9707:54, 30 March 2014

It would be easier for people to follow Manual:Upgrading instructions, and not unpack the new files over the old ones.

Ciencia Al Poder (talk)09:47, 31 March 2014