enabled exif module, added fields to photo content type using examples in readme, (php_exif extention enabled),

went to admin/settings/exif and received this error:

Fatal error: Call to undefined function read_exif_data() in C:\wamp\www\drupal 6.11\drupal-6.11-views-carousel\sites\all\modules\exif\exif.module on line 175

CommentFileSizeAuthor
#2 SAP-logo.jpg66.66 KBingomueller.net

Comments

asb’s picture

Priority: Normal » Critical

Hi,

I'm getting a similar error with the stable release version 5.x-1.2:

Fatal error: Call to a member function getEntry() on a non-object in /var/www/drupal/sites/all/modules/exif/exif.module on line 174

This error prevents images from being uploaded, thus setting the priority to "critical".

System environment: Drupal 5.17, LightTPD 1.4.19, Server API: FastCGI, PHP 5.2.6-1+lenny3, MySQL 5.0.51a @ Debian GNU/Linux "Lenny"

EXIF section from phpinfo:

EXIF Support 	enabled 
EXIF Version 	1.4 $Id: exif.c,v 1.173.2.5.2.25 2008/03/12 17:33:14 iliaa Exp $ 
Supported EXIF Version 	0220 
Supported filetypes 	JPEG,TIFF

Thanks & greetings, -asb

ingomueller.net’s picture

StatusFileSize
new66.66 KB

This doesn't seem to happen with every JPG file. Here's one that produces the error. HTH

asb’s picture

> This doesn't seem to happen with every JPG file.

Right! Here's another example: http://photobatch.wdfiles.com/local--files/start/Screenshot-Phatch3d.jpg

Greetings, -asb

dman’s picture

RE the OP (but not #1)

"Undefined function" would probably indicate that the appropriate PHP extension is not available.
For sure, the install process or admin pages should be more careful about that and at least do a if(function_exists('read_exif_data')) and refer to a little more help in an INSTALL.txt

On a fresh machine, I'm getting WSOD on admin/settings/exif, and I assume it may be this dependancy... (actually no, I have --enable-exif and "exif support".

Anyway, I still see that the code does not have a lot of paranoia about checking that a vital prerequisite does in fact exist, so probably a more friendly fallback/warning would be a good addition.

rapsli’s picture

patches are always welcome :)

yoeld’s picture

I have the same problem. Can somebody provide some hints on how to solve this?

Thanks, Yoel.

rapsli’s picture

you have to enable the exif module in apache.

asb’s picture

> you have to enable the exif module in apache.

Do you mean php.ini? I've never heard of an EXIF module for apache, and my Debian repository doesn't offer one.

BTW, what about people running other webservers (like Lighttpd or IIS)?

Greetings, -asb

rapsli’s picture

asb’s picture

Ah, so it *is* php.ini you were referring to. Please see #1, "EXIF section from phpinfo()":

EXIF Support enabled 
EXIF Version 1.4 $Id: exif.c,v 1.173.2.5.2.25 2008/03/12 17:33:14 iliaa Exp $ 
Supported EXIF Version 0220 
Supported filetypes JPEG,TIFF

Greetings, -asb

rapsli’s picture

wow wow... these are two completely different things: The issue is about the 6er version. @asb your bug is for the 5er version. ... I'm going to close this issue. Please open a new issue for the 5.x version.

rapsli’s picture

Category: support » task
Priority: Critical » Normal

lets make this task here:

Better message for "atal error: Call to undefined function read_exif_data() in C:\wamp\www\drupal 6.11\drupal-6.11-views-carousel\sites\all\modules\exif\exif.module on line 175"

yoeld’s picture

Thanks! #9 solved my problem.

I am using WAMP local webserver and both php_exif.dll & php_mbstring.dll where activated ... but in the wrong order! First must be php_mbstring.dll activated.

rapsli’s picture

Status: Active » Fixed

made some changes

asb’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.