PHP Fatal error: Cannot redeclare

If you see PHP Fatal error: Cannot redeclare function it means that there is a problem in your code (it tries to declare the same function several times). We do not provide coding services, you can find the problem on specialized resources, for example:
http://www.google.com/search?q=PHP+Fatal+error+Cannot+redeclare

This error means that your function is already defined. This could mean:

You have the same function defined in two files.
You have the same function defined in two places in the same file.
The file in which your function is defined is included two times (so it seems that the function is defined two times)
To help with the third point, the solution would be to use include_once instead of include when including your functions.php file, so it cannot be included more than once.

  • 350 Users Found This Useful
Was this answer helpful?

Related Articles

Error 502 Bad Gateway nginx and why does it occur?

If this error occurs, then HTTP requests from clients to your site are going through some kind of...

I can’t enter the site, it doesn’t work. What to do?

Sometimes your site may become unavailable and it may not be displayed for you. Here are the...

Ping command and tracert (traceroute) how to use correctly?

The ping command is used to check the availability of network resources. Most often it is needed...

How can I turn off PHP error output?

To disable error output in your script, use: error_reporting (0); Remember that you need to...

Help, the cron is not working

If you run a job through PHP, for example php -f /home/username/public_html/file.php and you...