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

Why is my Autossl failing in cPanel?

ERROR Local DNS DCV error (mail.example.com): The DNS query to...

How to Remove IP Address from Gmail Blacklist?

If you are receiving bounce back emails from Gmail, your IP address might be on the Gmail...

What is the difference between unmetered and unlimited bandwidth?

What is Bandwidth? In web hosting, bandwidth means the data transfer of your website to users in...

How to check VPS bandwidth usage from Accuwebhosting Client area?

You can easily view your VPS bandwidth report from the bandwidth meter tool. Please refer to the...

How do I check current established connections and network utilization of my VPS?

Windows VPS   For current established connections and processes:   Go to Run Type cmd, hit...

  • 0 Users Found This Useful

Was this answer helpful?