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

Where do i put my review for Accuwebhosting.com?

Here, is a list of website links where you can put your reviews for Accuwebhosting....

How to modify the PHP timezone setting?

If your website is hosted on shared hosting, you may not be able to change the Global time...

Free Anti-Malwares/ for Windows and Linux based Servers

As we all know, the internet is open and your server may receive threats of malware and Spywares...

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

  • 0 Users Found This Useful

Was this answer helpful?