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

How to enable "I'm Under Attack" mode in CloudFlare Panel?

Cloudflare provides additional protection called "I m under attack" for a website which is under...

How to make your ASP.Net applications secure?

Adding security to Web apps may not be great fun but it doesn't have to be hard. You can easily...

Comparison of control panels Plesk VS WHM/cPanel.

Web Hosting control panels are very useful to manage your servers with a front-end graphical web...

How do i setup rDNS/PTR record at Accuwebhosting?

Client can't set rDNS record at their end. You will need to submit a support ticket with the IP...

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

  • 0 Users Found This Useful

Was this answer helpful?