it seems like that maximum execution time error is hanging the rest of the script from executing .. which is probably what is causing the first error.
if the script doesn't completely finish, then part of the un-finished script is that 'undefined function'.
the only time i've got that error was when i had bad queries going on which made mysql hang.
what forum software are you using? that might help.