Jump to content

Topic on Project:Support desk

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

17
Summary by Ciencia Al Poder

Follow Manual:Upgrading instructions, and not unpack the new files over the old ones.

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.

67.210.162.194 (talkcontribs)

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

-Kevin

96.240.15.138 (talkcontribs)

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.

67.78.138.82 (talkcontribs)

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

195.80.111.234 (talkcontribs)

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

74.57.210.8 (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 :)

132.72.73.97 (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.

Lord Muffins (talkcontribs)

Holy shit this fixed it.


Upgraded from 1.16 to 1.27 via softaculus in cpanel. I can't believe it's that simple.