Below here my reply plus quick workaround.
-----------------------------------------------------------------------------
Hi, i had the same problem and did what was suggested, debugging it with Firebug.
It gave me an error in \administrator\components\com_phocagallery\libraries\phocagallery\geo\geo.php (division by zero) on line 63
It seems it tries to get the Location out of EXIF data. So when these coordinates are in there and are set to 0, you have a problem. In the code they did not think about this clearly. Anyway, after the first image is uploaded, it tries to get the location out of it, and exits after it receives multiple division by zero errors, that's why the uploader hangs after the first upload.
Did a little hack in the code, quick workaround
--- WORKAROUND ---
Find this code on line 47 in geo.php:
Code: Select all
if (!function_exists('exif_read_data')) {
return array('latitude' => 0, 'longitude' => 0);
} else {
$exif = exif_read_data($fileOriginal, 0, true);
$GPSLatDeg = explode('/',$exif['GPS']['GPSLatitude'][0]);
$GPSLatMin = explode('/',$exif['GPS']['GPSLatitude'][1]);
$GPSLatSec = explode('/',$exif['GPS']['GPSLatitude'][2]);
$GPSLonDeg = explode('/',$exif['GPS']['GPSLongitude'][0]);
$GPSLonMin = explode('/',$exif['GPS']['GPSLongitude'][1]);
$GPSLonSec = explode('/',$exif['GPS']['GPSLongitude'][2]);
$lat = $GPSLatDeg[0]/$GPSLatDeg[1]+
($GPSLatMin[0]/$GPSLatMin[1])/60+
($GPSLatSec[0]/$GPSLatSec[1])/3600;
$long = $GPSLonDeg[0]/$GPSLonDeg[1]+
($GPSLonMin[0]/$GPSLonMin[1])/60+
($GPSLonSec[0]/$GPSLonSec[1])/3600;
// $exif['GPS']['GPSLatitudeRef'] SHIROTA: N=+; S=-
// $exif['GPS']['GPSLongitudeRef'] DOLGOTA: E=+; W=-
if($exif['GPS']['GPSLatitudeRef'] == 'S'){$lat=$lat*(-1);}
if($exif['GPS']['GPSLongitudeRef'] == 'W'){$long=$long*(-1);}
return array('latitude' => $lat, 'longitude' => $long);
}
Above this code-block, so on line 46, just insert this code:
Code: Select all
return array('latitude' => 0, 'longitude' => 0);
It basically rips out the option to get a location out of the EXIF data. I'm sure there are far better solutions for this, maybe rewrite the code with some type of try clause in it. I'll let the developers do their work, maybe someone has a suggestion to rewrite the formulas for $lat en $long to make them work (prevent it is divided by zero)
Anyway, for me the above did the trick (and I don't use the EXIF and GPS stuff, so I don't care). After I changed the code my HTML5 uploader worked like a charm!