Andy_Pod3d
Andy_Pod3d

Reputation: 1

PHP Fatal error: Call to undefined function exif_imagetype()

I got a photo competition that seems to work fine but when I upload a photo I get a blank screen. I checked the error log and found this:

PHP Fatal error: Call to undefined function exif_imagetype() in /home/fbtabvhk/public_html/pinkdrive_selfie/contest/libs/upload/save.php on line 27

This is the code on line 27:

if (exif_imagetype($_FILES['files']['tmp_name'][0]) === FALSE)

Upvotes: 0

Views: 10777

Answers (2)

BenMorel
BenMorel

Reputation: 36554

You have to have the exif extension compiled and enabled for this function to work. This extension has good chances to be already compiled in your PHP installation, so you might just have to enable it in your php.ini:

On Linux:

extension=exif.so

On Windows:

extension=php_exif.dll

Note for Windows:

Windows users must enable both the php_mbstring.dll and php_exif.dll DLL's in php.ini. The php_mbstring.dll DLL must be loaded before the php_exif.dll DLL so adjust your php.ini accordingly.

Upvotes: 2

pavel
pavel

Reputation: 27072

Try to enable your php.ini and restart server.

extension=php_exif.dll

Upvotes: 0

Related Questions