Mediawiki PHP Fatal error: Cannot redeclare wfProfileIn() Error and Solution

I‘m running the Mediawiki software under Apache web server running on the Unix operating systems. I’m getting the following in my php error log:

ADVERTISEMENTS

PHP Fatal error: Cannot redeclare wfProfileIn() (previously declared in /var/www/html/wiki/includes/profiler/Profiler.php:14) in /var/www/html/wiki/includes/ProfilerStub.php on line 25.

How do I fix this problem under Mediawiki version 1.18.0?

According to this:

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.

In other words just delete the StartProfiler.php file or rename the file as StartProfiler_old.php:
rm /var/www/html/wiki/includes/StartProfiler.php
OR
mv /var/www/html/wiki/includes/StartProfiler.php /var/www/html/wiki/includes/StartProfiler_OLD.php

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
3 comments… add one
  • Jeff Apr 11, 2012 @ 3:25

    Thanks, this helped me finish my update quickly.

  • rafa Apr 19, 2012 @ 13:20

    Hi! I have the same problem, and I haven’t any file with this name in includes or in root path of wiki… any more idea?
    thanks!

  • Dragonius Sep 19, 2012 @ 8:40

    Well Here should be most of solutions to fix mediawiki.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.