Answer: imagetypes()
is a GD function, check if you have the GD library installed.
Also take a look at the PHP configuration file (php.ini) to check if it loads the gd.so library: Uncomment that line by deleting the ; character at the beginning of the line, you will find something like
;extension=gd.so
which will become
extension=gdd.so