exif_read_data not returning any GPS data - View exif data
exif_read_data not returning any GPS data
I did some "debug" on @exif_read_data($filename, "EXIF, IFD0, GPS", true)
And I see this below if statement is always FALSE on uploaded photos with GPS data:
if (!empty($exif["EXIF"]) || !empty($exif["GPS"]) || !empty($exif["IFD0"]))
But other part of EXIF data (such as image orientation, etc) show up just fine such as with this if statement:
if (!empty($exif['Orientation'])
I start to wonder if in my case, function exif_read_data with "PHP Version 5.2.17" (in my case) does not support extracting GPS data from EXIF, or what?
Any insight? Thanks!
-
- Registered User
- Posts: 283
- Joined: Sun Sep 29, 2013 7:37 pm
- Contact:
Re: exif_read_data not returning any GPS data
According to the specifications of exif_read_data, nothing was changed since PHP 4.3.0. The function follows strictly the exif 2.2-Standard, but many camera manufacturer don't write their tags correctly. Other image interpreters are (maybe) more error-tolerant in handling metadata.
Would it be possible to upload one of the problematic images in my testing area so I can further investigate this issue? You'll find it here: http://canonknipser.com/viewforum.php?f=11
Thanks in advance
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB
- canonknipser
- Registered User
- Posts: 2096
- Joined: Thu Sep 08, 2011 4:16 am
- Location: Germany
- Name: Frank Jakobs
- Contact:
Re: exif_read_data not returning any GPS data
Registered (Username: xiaolu)
Activated via --> email --> click link
Logged in
Viewed topic: "viewexif extension" (trying to reply to this topic, and upload an sample image with GPS data)
But I do not have permission to post at all.
Thanks again
-
- Registered User
- Posts: 283
- Joined: Sun Sep 29, 2013 7:37 pm
- Contact:
Re: exif_read_data not returning any GPS data
-
- Registered User
- Posts: 283
- Joined: Sun Sep 29, 2013 7:37 pm
- Contact:
Re: exif_read_data not returning any GPS data

phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB
- canonknipser
- Registered User
- Posts: 2096
- Joined: Thu Sep 08, 2011 4:16 am
- Location: Germany
- Name: Frank Jakobs
- Contact:
Re: exif_read_data not returning any GPS data
And then just now I posted a new one
Thanks again
-
- Registered User
- Posts: 283
- Joined: Sun Sep 29, 2013 7:37 pm
- Contact:
Re: exif_read_data not returning any GPS data
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB
- canonknipser
- Registered User
- Posts: 2096
- Joined: Thu Sep 08, 2011 4:16 am
- Location: Germany
- Name: Frank Jakobs
- Contact:
Re: exif_read_data not returning any GPS data
And then from board ACP --> PHP information: PHP Version 5.2.17
Thanks again!
But yes, on your test site, I do see the image from you that I posted did show up with GPS data! (on google map on clicked:-)
-
- Registered User
- Posts: 283
- Joined: Sun Sep 29, 2013 7:37 pm
- Contact:
Re: exif_read_data not returning any GPS data
a little further down, you should see the exif library informations like those:xiaolu wrote: ACP --> PHP information: PHP Version 5.2.17
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB
- canonknipser
- Registered User
- Posts: 2096
- Joined: Thu Sep 08, 2011 4:16 am
- Location: Germany
- Name: Frank Jakobs
- Contact:
Re: exif_read_data not returning any GPS data
from ACP --> PHP Info:
'--enable-exif'
exif
EXIF Support enabled
EXIF Version 1.4 $Id: exif.c 293036 2010-01-03 09:23:27Z sebastian $
Supported EXIF Version 0220
Supported filetypes JPEG,TIFF
-
- Registered User
- Posts: 283
- Joined: Sun Sep 29, 2013 7:37 pm
- Contact:
Re: exif_read_data not returning any GPS data
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB
- canonknipser
- Registered User
- Posts: 2096
- Joined: Thu Sep 08, 2011 4:16 am
- Location: Germany
- Name: Frank Jakobs
- Contact:
Re: exif_read_data not returning any GPS data
PS: You can remove the pic I uploaded on your test site (the one I took at home with GPS coordinate:-)
Thanks again,
-
- Registered User
- Posts: 283
- Joined: Sun Sep 29, 2013 7:37 pm
- Contact:
Re: exif_read_data not returning any GPS data

I removed your photo so your home is hidden again

phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB
- canonknipser
- Registered User
- Posts: 2096
- Joined: Thu Sep 08, 2011 4:16 am
- Location: Germany
- Name: Frank Jakobs
- Contact:
Re: exif_read_data not returning any GPS data
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB
- canonknipser
- Registered User
- Posts: 2096
- Joined: Thu Sep 08, 2011 4:16 am
- Location: Germany
- Name: Frank Jakobs
- Contact:
Re: exif_read_data not returning any GPS data
Thanks. I was indeed thinking to upgrade php but with webhosting --> cpanel I didn't find the option to upgrade, so I think I need to contact the hosting company.... Cheerscanonknipser wrote:Just another hint: maybe it's worth to upgrade the PHP version, because 5.2 has reached EOL more than 6 years ago (and maybe has some security leaks) and the actual 5.6-Version is good if you plan to update your phpBB to 3.2.x.
-
- Registered User
- Posts: 283
- Joined: Sun Sep 29, 2013 7:37 pm
- Contact: