Unable to retrieve GPS location from the EXIF
<p>In PHP I'm trying to extract EXIF information form an Image. I'm getting drastically different results when executing the same code in command line vs mod_php.</p>

<p>In the command line I can see all the data that I need, but with the mod_php it is very few. I wonder this is something to do with mbstring thing, but unable to find out what exactly is the root cause.</p>

<p>Any idea how I can read the entire Exif data in mod_php ?</p>

<pre><code>$exif = exif_read_data($fileLoc, "EXIF", true);

foreach ($exif as $i =&gt; $value) {
    if( ) {
        error_log("Debug:: In $i");
        foreach ($value as $j =&gt; $jvalue){
            error_log("      Debug: $j =&gt; $jvalue");
        }
    }
    else {
        error_log("Debug: $i =&gt; $value");
    }
}
</code></pre>

<p>mod_php output:</p>

<pre><code> Debug:: In COMPUTED
       Debug: html =&gt; width="2592" height="1936"
       Debug: Height =&gt; 1936
       Debug: Width =&gt; 2592
       Debug: IsColor =&gt; 1 
       Debug: ByteOrderMotorola =&gt; 1
 Debug:: In IFD0
       Debug: Orientation =&gt; 1
       Debug: Exif_IFD_Pointer =&gt; 38
 Debug:: In EXIF
       Debug: ColorSpace =&gt; 1
       Debug: ExifImageWidth =&gt; 2592
       Debug: ExifImageLength =&gt; 1936
</code></pre>

<p>commandline output:</p>

<pre><code>&lt;snip&gt;
Debug:: In EXIF
      Debug: ExposureTime =&gt; 1/120
      Debug: FNumber =&gt; 14/5
      Debug: ExposureProgram =&gt; 2
      Debug: ISOSpeedRatings =&gt; 100
      Debug: ExifVersion =&gt; 0221
      Debug: DateTimeOriginal =&gt; 2012:01:12 15:30:57
      Debug: DateTimeDigitized =&gt; 2012:01:12 15:30:57
      Debug: ComponentsConfiguration =&gt; 
      Debug: ShutterSpeedValue =&gt; 12989/1880
      Debug: ApertureValue =&gt; 4281/1441
      Debug: BrightnessValue =&gt; 19112/3529
      Debug: MeteringMode =&gt; 5
      Debug: Flash =&gt; 16
      Debug: FocalLength =&gt; 77/20
      Debug: SubjectLocation =&gt; Array
      Debug: FlashPixVersion =&gt; 0100
      Debug: ColorSpace =&gt; 1
      Debug: ExifImageWidth =&gt; 2592
      Debug: ExifImageLength =&gt; 1936
      Debug: SensingMethod =&gt; 2
      Debug: ExposureMode =&gt; 0
      Debug: WhiteBalance =&gt; 0
      Debug: SceneCaptureType =&gt; 0
      Debug: Sharpness =&gt; 2
Debug:: In GPS
      Debug: GPSLatitudeRef =&gt; N
      Debug: GPSLatitude =&gt; Array
      Debug: GPSLongitudeRef =&gt; W
      Debug: GPSLongitude =&gt; Array
      Debug: GPSAltitudeRef =&gt; 
      Debug: GPSAltitude =&gt; 0/1
      Debug: GPSTimeStamp =&gt; Array
</code></pre>
