Jump to content

Error with exif_read_data();


Skipjackrick

Recommended Posts

I continue to get this error below.  However its at random.

 

I believe it has to do with the user corrupting the exif data with an image resizing program etc.

 

Is there a way to notify the user that there has been an error when the exif data can't be read?

 

How would one go about writing the code for that?

 

This is how I am calling to read the data.  However when it can't?????  The program just goes to a php error screen.  I would like to take the user to a custom screen.

 

Something like this...However, I dont know the exact syntax.

<?php
        $directory = $_SERVER['DOCUMENT_ROOT'];

        $exif_data = exif_read_data ('' . $directory . '/submitted_pics/' . $image . '');

if ( $exif_data == error ) { header ("location: errorpage.php"); exit; }
?>

 

 

In case you wanted to look at the errors I get....

[04-Feb-2010 05:19:24] PHP Warning:  exif_read_data(1265260748_angler280_team69.jpg) [<a href='exif_read_data#error_ifd'>exif_read_data</a>]: Process tag(x0000=UndefinedTa): Illegal format code 0x0000, suppose BYTE in /home/extremf3/public_html/KW10/submission_submit.php on line 132

[04-Feb-2010 05:19:24] PHP Warning:  exif_read_data(1265260748_angler280_team69.jpg) [<a href='exif_read_data#error_ifd'>exif_read_data</a>]: Process tag(x0000=UndefinedTa): Illegal pointer offset(x6C656374 + x4C472045 = xB8AC83B9 > x0137) in /home/extremf3/public_html/KW10/submission_submit.php on line 132

[04-Feb-2010 05:19:24] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/extremf3/public_html/KW10/submission_submit.php:132) in /home/extremf3/public_html/KW10/submission_submit.php on line 258

Link to comment
https://forums.phpfreaks.com/topic/190962-error-with-exif_read_data/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.