Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4229
Latest: Ghost
New This Month: 3
New This Week: 0
New Today: 0
Stats
Total Posts: 43077
Total Topics: 7493
Most Online Today: 47
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 42
Total: 42

Author Topic: Help:Fatal error: Allowed memory size of 50331648  (Read 27317 times)

0 Members and 1 Guest are viewing this topic.

Offline greatflash

  • Member
  • *
  • Posts: 34
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #15 on: November 15, 2008, 07:59:09 pm »
if the image is greater than 3.5megs (or so), the upload completes and the browser status bar shows;
Waiting for http://greatflash.co.uk/Forum/index.php?action=gallery&sa=add2

forever....

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16355
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #16 on: November 15, 2008, 08:02:19 pm »
I would check with your host on the GD settings that seems really strange to use that much memory to begin with the process the image. Make sure they are using the latest version of GD.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline greatflash

  • Member
  • *
  • Posts: 34
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #17 on: November 15, 2008, 08:06:23 pm »
as I have explained - the images upload fine, the problem lies with the ability of the gallery to resize them.

Please try a 4meg image upload - PLEASE.

Now off to bed - this has given me a headache!! :) :)

Offline greatflash

  • Member
  • *
  • Posts: 34
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #18 on: November 15, 2008, 08:08:12 pm »
I will see what I can find out?

Is there anyway i can MANUALLY add the images?

Offline greatflash

  • Member
  • *
  • Posts: 34
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #19 on: November 16, 2008, 08:28:13 am »
This is all I could find out re:GD

GD Support  enabled 
GD Version  bundled (2.0.34 compatible) 
FreeType Support  enabled 
FreeType Linkage  with freetype 
FreeType Version  2.2.1 
GIF Read Support  enabled 
GIF Create Support  enabled 
JPG Support  enabled 
PNG Support  enabled 
WBMP Support  enabled 
XPM Support  enabled 
XBM Support  enabled 

not sure if that helps?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16355
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #20 on: November 16, 2008, 09:35:21 am »
I was able to get a 4.7 mb image resized had to bump up the size limit from 64mb
to
128

Find  all places for
Code:
Code: [Select]
@ini_set("memory_limit","64M");

Change to
Code:
Code: [Select]
@ini_set("memory_limit","128M");
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline greatflash

  • Member
  • *
  • Posts: 34
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #21 on: November 16, 2008, 01:13:54 pm »
Got this back from the host!

Greetings,
This is most likely due to the memory limit being set to 32MB. Unfortunately because these are shared servers that limit cannot be raised.

Hostpapa Technical Support


Any suggestions for a way to work round this?

At the moment I cannot really make use of the gallery unless I manually control uploads of images and create my own thumbs... A bit tricky! :/

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16355
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #22 on: November 16, 2008, 01:43:25 pm »
Find out if they support image magick if so I could looking into adding support for that which might use a little less memory.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline headkaze

  • Member
  • *
  • Posts: 4
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #23 on: November 16, 2008, 11:17:10 pm »
Hi SMFHacks I am helping Flash setup his website and have been working on this problem creating thumbnails from large images. The problem is his server is limited to 64MB per php script. Luckily he does have ImageMagick installed and I have successfully got it working.

Here is the modified code for Subs-Graphics.php.

Code: [Select]
function createThumbnail($srcName, $max_width, $max_height)
{
// Resizing to nothing?  Time to bail!
if ((empty($max_width) && empty($max_height)))
return false;

$destName = $srcName . '_thumb.tmp';

// Ask for more memory: we need it for this, and it'll only happen once!
@ini_set('memory_limit', '48M');

$success = false;
$sizes = getimagesize($srcName);

if (empty($sizes))
return false;

resizeImageMagick($srcName, $destName, $sizes[0], $sizes[1], $max_width, $max_height);
$success = true;

// Okay, we're done with the temporary stuff.
$destName = substr($destName, 0, -4);

if ($success && @rename($destName . '.tmp', $destName))
return true;
else
{
@unlink($destName . '.tmp');
@touch($destName);
return false;
}
}

function resizeImageMagick($srcName, $destName, $src_width, $src_height, $max_width, $max_height)
{
// Determine whether to resize to max width or to max height (depending on the limits.)
if (!empty($max_width) || !empty($max_height))
{
if (!empty($max_width) && (empty($max_height) || $src_height * $max_width / $src_width <= $max_height))
{
$dst_width = $max_width;
$dst_height = floor($src_height * $max_width / $src_width);
}
elseif (!empty($max_height))
{
$dst_width = floor($src_width * $max_height / $src_height);
$dst_height = $max_height;
}

shell_exec("convert -geometry $dst_width x $dst_height $srcName $destName");
}
else
shell_exec("convert -geometry $src_width x $src_height $srcName $destName");
}
« Last Edit: November 17, 2008, 12:37:49 pm by headkaze »

Offline greatflash

  • Member
  • *
  • Posts: 34
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #24 on: November 17, 2008, 02:45:43 am »
I would just like to say that this mod works a treat.

Images over 10meg in size upload and generate thumbs etc perfectly.

Can support for imagemagik be incorperated into the next release and future updates as you suggested? Otherwise an update of the software on my site would kill the mod.

I do believe it is a worthy addition that only improves on a brilliant product.

Thanks for all your time "SMFHacks" (and HK :) )

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16355
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #25 on: November 17, 2008, 08:50:10 pm »
Awesome thanks for the image magick stuff. I am working on getting imagemagik on my server so I can experiment with its options
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline greatflash

  • Member
  • *
  • Posts: 34
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #26 on: November 18, 2008, 03:16:53 am »
It does open the gallery up to a more professional user as the memory overhead is less allowing for far larger images.
I have uploaded a 14meg image with no problems, so thanks for taking not and looking into it! You are a great help!

This does bring me neatly to another thing! (oh god! he's off on one again)

This perhaps would be better in requests, but is tied to the image size problem..

When using excessivley sized images (over 3000x3000) a direct download link would be a wonderful addition.

At the momemt, a tumb has to be clicked to open a medium image, to click on that, to.... you get the point?

Is it possible to add a "Click here to download full image" to the bottom of the medium image (beneath prev/next)?

This would make navigation much simpler and enable a user to just click on the thumbnail and download.

Just a thought as an expanded full size image of a 3000x3000 picture displays one corner of it in the browser to right click on..

Thanks for all your help!

Offline greatflash

  • Member
  • *
  • Posts: 34
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #27 on: November 19, 2008, 06:58:58 pm »
I have the gallery set up perfectly (almost)

In the previous post, I have requested the ability to add a download link to the medium image display.

If someone could please point me in the right direction, I would be a very happy bunny..

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16355
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #28 on: November 19, 2008, 07:11:29 pm »
As long as there is a topic in the feature request forum it will considered for the next release.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline skip

  • Member
  • *
  • Posts: 16
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #29 on: March 07, 2009, 03:45:12 am »
Was also receiving these errors:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 3264 bytes) in /home/nickpm/public_html/talk/Sources/Gallery.php on line 4762

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 1024 bytes) in /home/nickpm/public_html/talk/Sources/Subs-Graphics.php on line 315

I'm not sure if is related to when the gallery grows to a certain size of memory limitations on the actual hosted server?

I have modified the gallery.php and the sub-gallery.php to increase to 128M and will see how that goes. But it would be useful to try and understand why this is happening, do I need to prune my gallery a bit?

 

Related Topics

  Subject / Started by Replies Last post
2 Replies
3908 Views
Last post July 03, 2007, 11:32:53 pm
by djrichards
2 Replies
21360 Views
Last post January 07, 2008, 02:36:45 am
by Arie.
3 Replies
3578 Views
Last post February 06, 2008, 02:07:58 pm
by MoreBloodWine
2 Replies
4973 Views
Last post May 09, 2009, 10:58:39 am
by SMFHacks
4 Replies
2280 Views
Last post November 22, 2011, 12:13:11 pm
by jstop

+- Recent Topics

Version 6.1.6 issues by SMFHacks
September 25, 2023, 09:52:10 am

Follow / Follower Mod? by SMFHacks
September 23, 2023, 08:44:44 am

Looking for a good video player by replayuk
September 23, 2023, 12:17:39 am

[Mod]Discord Web Hooks by SMFHacks
September 22, 2023, 03:57:28 pm

SMF 2.1.4 Search by Anmer
September 22, 2023, 01:55:15 pm

Error in thise mode by Ghost
September 15, 2023, 08:42:24 am

Gallery Selection List Order by mickjav
September 07, 2023, 12:46:31 pm

[Mod]Tidy Child Boards 2.0 by Norwinjose
September 02, 2023, 11:42:54 am

PrettyUrls SEO Pro: Unable to submit sitemap to google search conmsole by SMFHacks
August 31, 2023, 10:55:22 am

PrettyURL - SEO4SMF Rewrites? by SMFHacks
August 28, 2023, 06:35:33 pm

Powered by EzPortal