Jump to content

Cannot redeclare function_name() error


michaelh613

Recommended Posts

I am getting this error message

 

Fatal error: Cannot redeclare function_name() (previously declared in C:\Inetpub\Sites\site_name\includes\functions.php:5) in C:\Inetpub\Sites\site_name\includes\functions.php on line 27

 

Whats confusing me is this occurs for every function in functions.php and I am not duplcating them. They are only in includes\functions.php

 

Any ideas what could cause this. I've checked if I might be including it twice but verified its only in once.  I even changed my include to an include_once

 

I also tried not including it and verified that I was then getting errors that my functions were not appearing

Link to comment
https://forums.phpfreaks.com/topic/102444-cannot-redeclare-function_name-error/
Share on other sites

You would need to post your code for functions.php and any code that is including it.

 

You either have the include or the function definition inside a loop or you have multiple include statements or multiple functions using the same name.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.