Skipjackrick Posted February 4, 2010 Share Posted February 4, 2010 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.