[RESOLVED] Profiler.php Fatal Error Cannot redeclare wfprofilein()
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.
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.
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
- 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" );
I found a file in the mediawiki root folder called StartProfiler.php and deleted it, so far so good, all seems to be working :-)
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.
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.
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.
ditto on thanks for the fix. Renamed my StartProfiler.php to .old and the upgrade went as planned afterwards.
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.