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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.