The simpler media website CMS
Warning: fread() [function.fread]: Length parameter must be greater than 0 in /hermes/web01/b2651/nwh.abqfol/photos/zp-core/exif/makers/gps.php on line 228
Warning: fread() [function.fread]: Length parameter must be greater than 0 in /hermes/web01/b2651/nwh.abqfol/photos/zp-core/exif/makers/gps.php on line 228
Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 914025265 bytes) in /hermes/web01/b2651/nwh.abqfol/photos/zp-core/exif/makers/gps.php on line 228`
When I check the images table in the database, it looks like only 20 out of the 114 images have been entered. First hypothesis: one (at least) of the images has some bad EXIF gps information.
I removed all the photos that didn't get processed into the database. All of the albums display okay.
Then I tried adding files via ftp back into the folder in the albums directory. If I add one file at a time, the file is processed into the database and the album is fine. If I add more than one file, one of the files is processed and the others aren't and I get the same errors shown above.
The same thing happens if I use the web-based upload page. One file is processed; the others aren't and the error occurs.
Any ideas on what I can do? Adding one file at a time and making sure it is added to the database is tedious.
Thanks for your help.
Comments
If, by admin backend upload, you mean the uploading here: zp-core/admin-upload.php, then yes, I did try that. One file was fine, more than one caused the error.
The files are all 640 by about 480 (they've all been resized so that the longest size is 640 px).
The error occurs in the fread line in this block of code:
`
//4 byte number of elements
$count = bin2hex(substr($block,$place,4));$place+=4;
if($intel==1) $count = intel2Moto($count);
$bytesofdata = $size*hexdec($count);
//4 byte value or pointer to value if larger than 4 bytes
$value = substr($block,$place,4);$place+=4;
if($bytesofdata<=4) {<br />
$data = $value;
} else {
$value = bin2hex($value);
if($intel==1) $value = intel2Moto($value);
$v = fseek($seek,$globalOffset+hexdec($value)); //offsets are from TIFF header which is 12 bytes from the start of the file
if($v==0) {
$data = fread($seek, $bytesofdata);
} else if($v==-1) {
$result['Errors'] = $result['Errors']++;
}
}
`
which is in the parseGPS function.
At first, I thought the photos had "bad" GPS info, and I still think that may be true. But I don't understand why ZenPhoto can process one image at a time but not more than one.
Thanks for your help.