Question:
PHP debugging help needed?
Justin H
2010-08-08 18:23:25 UTC
I have a script where I made some minor changes, but each time I attempt to run the script I get the following error:

"PHP Fatal error: Cannot redeclare format_run_time() (previously declared in /home/paradise/public_html/admin/functions.php:2) in /home/paradise/public_html/functions.php on line 190"

The thing that's driving me nuts is I don't use the function format_run_time() in this script and I have not made any changes to my functions.php file.
Three answers:
?
2010-08-09 01:01:45 UTC
Beware of "include"

Use require_once("filename");

This prevent any file to be loaded twice.

For the rest, check line 190 of functions.php: "format_run_time" must be there!

Then check in the other file.

If all fails, change the name of your function.
?
2010-08-08 21:34:08 UTC
Maybe you included functions.php more than once?
juliepelletier
2010-08-08 18:30:08 UTC
That function doesn't appear to exist anywhere else, so you should look for it in your code.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...