Hossam Ahmed
Hossam Ahmed

Reputation: 91

PHP Fatal error: Uncaught Error: Call to undefined function exif_imagetype()

SO I'm getting this error when trying to upload an image.

the code part is here

if (exif_imagetype($_FILES["site_logo"]["tmp_name"]) != IMAGETYPE_PNG)
        {
            adminFunctions::setError('Logo does not appear to be a PNG image. Please check and try again.');
        }

I tried to add this setting to php.ini and checked that it's enabled

extension=php_mbstring.dll
extension=exif.so
extension=php_exif.dll

and the strange that it's working on my localhost but online it's giving that error!

Upvotes: 1

Views: 783

Answers (1)

Hossam Ahmed
Hossam Ahmed

Reputation: 91

I contacted the host and they enabled exif for the server even I inserted it in the php.ini it wasn't installed on the server itself.

Upvotes: 1

Related Questions