visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Languages :: PHP :: Fatal error: Call to undefined function: exif_read_data()


By: michi001 U.S.A.  Date: 21/05/2003 00:00:00  English  Points: 50 Status: Answered
Quality : Excellent
Hi,
php_exif.dll I got instaled just on some servers and I need to go over this error on that where it is not installed.

- I need to get know, that it's not loaded to do not use it
- or silently handle and continue running (?)

or something like that - easiest best :)

thank you very much
Michal

By: VGR Date: 21/05/2003 03:28:00 English  Type : Answer
ok

What is the best : get phpinfo(); result and parse to see whether GD is installed, if you are on windows, and if the version is >=4.2.0 8-)))
You cuold even know if --enable-exif. was enabled at PHP compile time

(reference : <A HREF="http://www.php.net/manual/en/function.exif-read-data.php">http://www.php.net/manual/en/function.exif-read-data.php</a> )

What I recommend : calling an inucuous exif function with the @ operator : this way you'll silently get notices and warnings alike in the result value, given no fatal error arises (hence the "inocuous")
Given exif_imagetype doesn't require GD, I suggest to use @exif_imagetype(filename) and if ever you get no data (FALSE returned), then presume exif_read_data shouldn't be called :D



OK, given the exif_read_data is located in GD or it's own library, but
Last, if you are on Zindoze, please RTFM this :
"koliber at supermedia dot pl 17-Sep-2002 09:53
If you installed PHP by Windows installer you will have problems with tis function.
exif_read_data is NOT included in gd library. It's in exif library. So if you want to read EXIF data you must load this library like this:
dl ("php_exif.dll");
"


By: michi001 Date: 21/05/2003 03:43:00 English  Type : Comment
I finaly found best this:

if(extension_loaded("exif")) $exif = exif_read_data($bigpicture,'EXIF',true); else $exif = false;

:-))
bye bye
By: VGR Date: 21/05/2003 03:57:00 English  Type : Comment
good.

Do register to be able to answer

EContact
browser fav
page generated in 297.756910 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page