I've increased the memory as high as 256M both with jw_sigpro.php and php.ini but still get memor allocation errors. The error refers to line 325 on the /joomla/filesystem/archive/zip.php file.
I've listed part of the code below and bolded line 325.
All help is greatly appreciated.
function _getZipInfo(& $data)
{
// Initialize variables
$entries = array ();
// Find the last central directory header entry
$fhLast = strpos($data, $this->_ctrlDirEnd);
do {
$last = $fhLast;
} while(($fhLast = strpos($data, $this->_ctrlDirEnd, $fhLast+1)) !== false);
// Find the central directory offset
$offset = 0;
if($last) {
$endOfCentralDirectory = unpack('vNumberOfDisk/vNoOfDiskWithStartOfCentralDirectory/vNoOfCentralDirectoryEntriesOnDisk/vTotalCentralDirectoryEntries/VSizeOfCentralDirectory/VCentralDirectoryOffset/vCommentLength', substr($data, $last+4));
$offset = $endOfCentralDirectory;
}
// Get details from Central directory structure.
$fhStart = strpos($data, $this->_ctrlDirHeader, $offset);
do {
if (strlen($data) < $fhStart +31) {
$this->set('error.message', 'Invalid ZIP data');
return false;
}
$info = unpack('vMethod/VTime/VCRC32/VCompressed/VUncompressed/vLength', substr($data, $fhStart +10, 20));
$name = substr($data, $fhStart +46, $info);
$entries[$name] = array('attr' => null, 'crc' => sprintf("%08s", dechex($info )), 'csize' => $info, 'date' => null, '_dataStart' => null, 'name' => $name, 'method' => $this->_methods[$info], '_method' => $info, 'size' => $info, 'type' => null);
$entries[$name] = mktime((($info >> 11) & 0x1f), (($info >> 5) & 0x3f), (($info << 1) & 0x3e), (($info >> 21) & 0x07), (($info >> 16) & 0x1f), ((($info >> 25) & 0x7f) + 1980));
if (strlen($data) < $fhStart +43) {
$this->set('error.message', 'Invalid ZIP data');
return false;
}
$info = unpack('vInternal/VExternal/VOffset', substr($data, $fhStart +36, 10));
$entries[$name] = ($info & 0x01) ? 'text' : 'binary';
$entries[$name] = (($info & 0x10) ? 'D' : '-') .
(($info & 0x20) ? 'A' : '-') .
(($info & 0x03) ? 'S' : '-') .
(($info & 0x02) ? 'H' : '-') .
(($info & 0x01) ? 'R' : '-');
$entries[$name] = $info;
// Get details from local file header since we have the offset
$lfhStart = strpos($data, $this->_fileHeader, $entries[$name]);
if (strlen($data) < $lfhStart +34) {
$this->set('error.message', 'Invalid ZIP data');
return false;
}
$info = unpack('vMethod/VTime/VCRC32/VCompressed/VUncompressed/vLength/vExtraLength', substr($data, $lfhStart +8, 25));
$name = substr($data, $lfhStart +30, $info);
$entries[$name] = $lfhStart +30 + $info + $info;
} while ((($fhStart = strpos($data, $this->_ctrlDirHeader, $fhStart +46)) !== false));
$this->_metadata = array_values($entries);
return true;
}