- Posts: 9
COMMUNITY FORUM
- Forum
- Commercial Joomla Extensions & Templates
- Simple Image Gallery PRO
- K2 and SIG Pro 2.0.4 memory error.
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.
K2 and SIG Pro 2.0.4 memory error.
- William A Sommers
- Topic Author
- Offline
- New Member
Less
More
15 years 4 months ago #26836
by William A Sommers
K2 and SIG Pro 2.0.4 memory error. was created by William A Sommers
Just installed K2 and want tou use SIG Pro 2.0.4 but continually get the following error:
Fatal error: Allowed memory size of 18874368 bytes exhausted (tried to allocate 1046044 bytes) in /hermes/bosweb/web023/b235/ipw.wmclamco/public_html/joomla/libraries/joomla/filesystem/archive/zip.php on line 325
Any idea what this means!!!
All help is greatly appreciated.
Fatal error: Allowed memory size of 18874368 bytes exhausted (tried to allocate 1046044 bytes) in /hermes/bosweb/web023/b235/ipw.wmclamco/public_html/joomla/libraries/joomla/filesystem/archive/zip.php on line 325
Any idea what this means!!!
All help is greatly appreciated.
Please Log in or Create an account to join the conversation.
- Yiota
- Visitor
15 years 4 months ago #26837
by Yiota
Replied by Yiota on topic Re: K2 and SIG Pro 2.0.4 memory error.
You will have to change the memory limit. Apparently your images exceed that limit because of their size and you get that message. Either change the memory limit inside the php.ini file (ask your provider to do this to the server) or try to use smaller image sizes in order not to have this problem.
You could see the size of that parameter indide the joomla administration through Help->System info->PHP information. Also before changing the parameter inside the php.ini file you could also try uncommenting the line 15 inside plugins->content->jw_sigpro.php and experiment with the size (64MB to a larger number) if it doesn't work.
Do the change of the php.ini file after making sure that with the above modification in the jw_sigpro.php file your gallery isn't working yet.
You could see the size of that parameter indide the joomla administration through Help->System info->PHP information. Also before changing the parameter inside the php.ini file you could also try uncommenting the line 15 inside plugins->content->jw_sigpro.php and experiment with the size (64MB to a larger number) if it doesn't work.
Do the change of the php.ini file after making sure that with the above modification in the jw_sigpro.php file your gallery isn't working yet.
Please Log in or Create an account to join the conversation.
- William A Sommers
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
15 years 4 months ago #26838
by William A Sommers
Replied by William A Sommers on topic Re: K2 and SIG Pro 2.0.4 memory error.
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;
}
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;
}
Please Log in or Create an account to join the conversation.
- Yiota
- Visitor
15 years 4 months ago #26839
by Yiota
Replied by Yiota on topic Re: K2 and SIG Pro 2.0.4 memory error.
Could you check through Help->System info->PHP information the memory_limit exactly what it says because there is a chance that besides you changed it your provider won't allow it.
You could also check the error log of the server to see what it says for the momery limit.
I want you to tell me where exactly do you get that error? Do you get it through all your site, only in pages that you have SIG Pro, in pages that you have K2, in the administration where? Provide us with a link.
If you are using SIG Pro, how many images and what total size do you have for each gallery folder?
You could also check the error log of the server to see what it says for the momery limit.
I want you to tell me where exactly do you get that error? Do you get it through all your site, only in pages that you have SIG Pro, in pages that you have K2, in the administration where? Provide us with a link.
If you are using SIG Pro, how many images and what total size do you have for each gallery folder?
Please Log in or Create an account to join the conversation.
- Forum
- Commercial Joomla Extensions & Templates
- Simple Image Gallery PRO
- K2 and SIG Pro 2.0.4 memory error.