[thelist] [php] cannot redeclare function error

Hans Fraser hfraser at videotron.ca
Mon Feb 10 15:49:01 CST 2003

On Monday, February 10, 2003, at 04:31  PM, Paul Bennett wrote:

> I am getting an error with one function :
> "*Fatal error*: Cannot redeclare getuser() in */<file
> path>/includes/databaseFunctions.php* on line *20*"
> when databaseFunctions.php is included.
> There are two possible errors that cause this error (that I know of)
> (1) The function is being defined twice - this is not happening with
> mine, as it only occurs *once* in all 4 files that the script involves.
> (2) It is a reseved built in function name for an already existing php
> function - the function name i am using is "getUser()". I have scoured
> the manual and have found no match.
> The function does not call itself, which I thought could also cause the
> error. Does anyone have any suggestions?
or (3)maybe the file is included more than once !

check if you got some recursive includes (happened to me once!)
(ie: the file is included in an other file too!)

Hans-Frédéric Fraser
tel: 514.425.1789
cel: 514.944.1789

More information about the thelist mailing list