PHP Fatal error: Cannot redeclare

If your browser saw an error message PHP Fatal error: Cannot redeclare function it is an issue with your code or script as it tries to declare the same function multiple times

It means the function is already defined  or the following can be the issue

  1. Same function defined in two files.
  2. Same function defined in two places within the same file.
  3. the file where the function is defined is included two times (function defined 2 times)

You can use the include_once instead of include to include your functions.php file to overcome the issue you face in the above 3rd point. 

Related Articles

Diagnostic Tools - Check Website Connection, Website Availability

Ping Ping is a command to check whether a destination computer system is working on a network or...

How to enable TLS in Google Chrome, Mozilla Firefox and Internet Explorer?

Here are the steps you can follow to enable TLS in different browsers: Firefox Type...

How to set outlook rule to receive emails to inbox?

You may face an issue where your emails are moving to the recipient spam box instead of Outlook...

How to choose an OS lower than Windows 2012 with 1 GB RAM?

We don't offer Windows 2008 Server OS anymore. We offer Windows Server OS 2012, 2016 and 2019....

Comparison between Plesk and SolidCP ControlPanel.

Please refer to the below table which is showing the comparison between Plesk and SolidCP Control...

  • 0 Users Found This Useful

Was this answer helpful?