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 my order is showing as a fraud?

We at Accuwebhosting have an automated order verification system that verifies your order...

How to enable CORS for your website?

A request for the website resource like images or fonts from outside of the origin website is...

Where do i put my review for Accuwebhosting.com?

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

Does Mobile application requires hosting service?

Yes, you need a hosting service for the application backend to manage the following thing....

How to check your VPS Disk Drive is SSD or HDD?

We use HyperV virtualization technology for our Denver based Classic and SSD Windows VPS. We have...

  • 0 Users Found This Useful

Was this answer helpful?