Topic on Project:Support desk

Jump to navigation Jump to search

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

Calebrw (talkcontribs)

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.

Varnent (talkcontribs)

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.

Unibond (talkcontribs)

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

Wargo (talkcontribs)
Unibond (talkcontribs)

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

Varnent (talkcontribs)

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.

Reach Out to the Truth (talkcontribs)

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.

Calebrw (talkcontribs)

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. (talkcontribs)

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

-Kevin (talkcontribs)

This works. I renamed startProfiler.php to 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. (talkcontribs)

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

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

Fixed it for me! Thanks!

Esenabre (talkcontribs)

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

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

Ciencia Al Poder (talkcontribs)

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

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