Author Topic: Fatal error uploading documents  (Read 6011 times)

felipe

  • Newbie
  • *
  • Posts: 9
    • View Profile
Fatal error uploading documents
« on: March 09, 2009, 09:04:52 pm »
Hi guys, I was uploading several images today and I got the following error after uploading a few:

Fatal error: Out of memory (allocated 34078720) (tried to allocate 21660604 bytes) in /homepages/40/d100431708/htdocs/opengoo/library/simplegd/classes/SimpleGdImage.class.php on line 110

Now every time I clic on documents it shows the documents for a while, but when it finishes loading it shows the same error.

Best Regards,
Felipe

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Fatal error uploading documents
« Reply #1 on: March 12, 2009, 09:19:04 am »
You can try increasign the memory_limit PHP config option. In your case it is set to 32M, try increasing to 64M. Anyway, you shouldn't be getting that error when listing documents, because the size of the documents shouldn't affect that listing, so I'll check this issue.

Thanks for reporting.

felipe

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Fatal error uploading documents
« Reply #2 on: March 12, 2009, 08:05:48 pm »
Hi, the memory_limit is on a file that belongs to the opengoo instalation or it is part of the php installation? I have the open goo up on 1and1 and I don't know if I'll be able to do that.

I upgraded to 1.3RC2 and the problem persists, but is only for a specific workspace and its parent.

Regards,
Felipe

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Fatal error uploading documents
« Reply #3 on: March 13, 2009, 02:33:08 pm »
Hi, this will be fixed on 1.3 final, out next week (probably monday). Here's the fix if you can't wait:

On 'application/models/project_file_revisions/ProjectFileRevision.class.php' change function getTypeIconUrl (line 243) to:

Code: [Select]
function getTypeIconUrl($showImage = true) {
// return image depending on type string
$image = "file.png";
$mimeType = str_replace("/", "-", $this->getTypeString());
$parts = split("-", $mimeType);
if (count($parts) > 0) {
$theme = config_option("theme", DEFAULT_THEME);
$base = ROOT . "/" . PUBLIC_FOLDER . "/assets/themes/$theme/images/48x48/types/";
$acc = "";
foreach ($parts as $part) {
if ($acc != "") $acc .= "-";
$acc .= $part;
if (is_file($base . $acc . ".png")) {
$image = $acc . ".png";
} else {
break;
}
}
}
return get_image_url("48x48/types/$image");
} // getTypeIconUrl

Please tell me if this effectively fixes your problem.

Thanks.

felipe

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Fatal error uploading documents
« Reply #4 on: March 20, 2009, 04:02:12 pm »
Ignacio, you rock!


Best regards!!
Felipe Ureta