What is exif php extension?

Change language:

Submit a Pull Request Report a Bug

Exchangeable image information

  • Introduction
  • Installing/Configuring
    • Requirements
    • Installation
    • Runtime Configuration
    • Resource Types
  • Predefined Constants
  • Exif Functions
    • exif_imagetype — Determine the type of an image
    • exif_read_data — Reads the EXIF headers from an image file
    • exif_tagname — Get the header name for an index
    • exif_thumbnail — Retrieve the embedded thumbnail of an image
    • read_exif_data — Alias of exif_read_data

+add a note

User Contributed Notes

There are no user contributed notes for this page.

I'm using exif data to carry captions for my images.

Using exif_read_data on localhost worked fine (with Apache on Ubuntu), but Heroku reports:

PHP Fatal error: Call to undefined function exif_read_data() in /app/path/to/files.

I'm not really sure what to do here, looking at the error message it would appear that EXIF functions are not installed/enabled on my Heroku app.

Can it be added or enabled?

Potherca

12.2k5 gold badges70 silver badges86 bronze badges

asked Apr 25, 2013 at 20:52

exif extension is not enabled in your heroku environment.

You need support for exif in order to use its functions. In php.ini you will find these two lines are the ones that do it:

extension=php_mbstring.dll
extension=php_exif.dll

And of course the dlls should be available in the correct folder - For linux instead of .dll they would be .so. I am not sure how it works in heroku. Maybe you can get their tech support to check these?

answered Apr 25, 2013 at 20:57

What is exif php extension?

raidenaceraidenace

12.7k1 gold badge31 silver badges34 bronze badges

3

Not the answer you're looking for? Browse other questions tagged php heroku or ask your own question.

I moved my website to a vps and I used exif function but look like in this new server exif not installed or enabled.. I tied many ways to enable it but no success:

Information:

Linux, Apache, Centos7

First, I run php -m but there is no exif in list.

options.conf

php1_release=7.2
php1_mode=mod_php

configure.php72

--enable-mbstring \
--enable-exif

php.ini

extension=php_mbstring.dll
extension=php_exif.dll   

But still I got:

PHP Fatal error: Uncaught Error: Call to undefined function exif_read_data() in...

Any idea?

asked Mar 19, 2019 at 6:12

What is exif php extension?

1

If php.ini contents is like this:

1   extension=php_mbstring.dll
2   extension=php_exif.dll

make sure in your PHP installation ext directory php_exif.dll is present.

If it's not there, get it from here.

answered Mar 19, 2019 at 8:02

OvermindOvermind

2,9702 gold badges15 silver badges24 bronze badges

I'm using PHP 8 here.

Edit your php.ini which is probably in /etc/php

Page down to "Dynamic Extensions"

Uncomment this line...

extension=exif

Save.

Exif is included, so there's nothing to install.

Restart php-fpm for the changes to take effect.

answered Feb 26 at 9:44

PJ BrunetPJ Brunet

5561 gold badge5 silver badges15 bronze badges

Not the answer you're looking for? Browse other questions tagged linux centos apache-2.4 centos7 or ask your own question.

What is exif in PHP?

The exif_read_data() function in PHP reads the EXIF (Exchangeable image file format) headers from an image file. This function extracts all the EXIF headers from an image file.

What is exif extension?

EXIF (Exchangeable Image File Format) files store important data about photographs. Almost all digital cameras create these data files each time you snap a new picture. An EXIF file holds all the information about the image itself — such as the exposure level, where you took the photo, and any settings you used.

How to install exif extension PHP?

Install and enable exif.
Information: Linux, Apache, Centos7. First, I run php -m but there is no exif in list..
options.conf php1_release=7.2 php1_mode=mod_php..
configure.php72 --enable-mbstring \ --enable-exif..
php.ini extension=php_mbstring.dll extension=php_exif.dll. But still I got:.