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: 62
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 62
Total: 62

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

0 Members and 1 Guest are viewing this topic.

Offline greatflash

  • Member
  • *
  • Posts: 34
    • View Profile
Help:Fatal error: Allowed memory size of 50331648
« on: November 15, 2008, 11:14:56 am »
I cannot upload pictures and get this error upon upload..

Fatal error: Allowed memory size of 50331648 bytes exhausted (tried to allocate 2400 bytes) in /home/zvvrohq/public_html/Forum/Sources/Subs-Graphics.php on line 315

I am possibly being a fool and there is something that I have missed??

I have tried allsorts and the files are small jpgs and large pngs.. It does not seem to matter which..

It is driving me nuts.

What is strange is that it was fine under "Lite"?

EDIT: Set max image size to 0 and it has accepted 2 images (one of nearly 3 megs).. But, is there anything else I should do?

Quick question:
Is there a way to set GLOBAL access rights to all non-user galleries.
I.e. No uploads, no non-member viewing of full images without doing each cat and sub cat individually?

Thanks from a new user awaiting hostpapa to remove mod security from my domain :( :(

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16355
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #1 on: November 15, 2008, 11:27:00 am »
Hmm, that message is saying it needs more than 48mb of memory to complete the task for some reason.
I will change it from 45mb to 64mb for the next update out today.

For now you can modify Sources/Gallery.php
Find  all places for
Code: [Select]
@ini_set("memory_limit","45M");
Change to
Code: [Select]
@ini_set("memory_limit","64M");
And see if that helps.

For the question not yet but would make a good feature request.
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 #2 on: November 15, 2008, 12:02:25 pm »
Thanks for the quick reply.

It has worked a treat.

With regards the permissions - perhaps a "permission" edit on the add category page to enable "on the fly" edits of permissions, rather than adding the category and then remembering to "edit permissions" after the event. I keep forgetting an have to go through them one by one to check what ones I have missed.. But - I do always make work for myself :)

Again, thanks.

Offline thefley

  • Member
  • *
  • Posts: 35
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #3 on: November 15, 2008, 04:05:40 pm »
what should this be set at? "Set max image size to 0" from above posts.

Offline greatflash

  • Member
  • *
  • Posts: 34
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #4 on: November 15, 2008, 05:39:01 pm »
Still having problems uploading.

Trying to upload an image "Acorn Atom.png"
The file is 3000x2059 and 3.61MB
The file apears to upload and at the end, nothing.. The bottom of the screen shows "Done" though no image is in the gallery and also the browser is on a blank white page...
Have also tried from ftp dir and from upload dir.
all to the same outcome.
The gallery I was uploading to also is showing 1 image but contains none?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16355
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #5 on: November 15, 2008, 05:48:33 pm »
Could also be your php.ini if you are uploading an image by default php limits you to know more 2mb for a file upload. upload_file_size and post_size I believe need to be increased.
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 #6 on: November 15, 2008, 06:03:12 pm »
I cannot find a php.ini file to edit :(

Sorry!

Offline greatflash

  • Member
  • *
  • Posts: 34
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #7 on: November 15, 2008, 06:11:01 pm »
I am uploading pictures and have got one to complete.
The gallery shows that the image is counted but going to its location does not even show the thumnail? nothing.
I picked an image just under 2megs and it is visible on the ftp in 3 file sizes..

I have a headache now :(

Offline greatflash

  • Member
  • *
  • Posts: 34
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #8 on: November 15, 2008, 06:14:59 pm »
SORTED:

Checked gallery settings and the first set of settings had made everything 0 and all ticks off!
number of images per page was 0..

Why that happened I have no idea?

No, i have not fiddled with any files on the ftp, just been trying to upload via the web browser!

EDIT:
It does appear to be a file size issue, anything over 2meg fails and causes problems with the db occassionally. What I cannot understand is that these images are uploaded, but not appended to the galleries database, all seems to end upon upload completion..

EDIT2:
The main image is uploaded, but (and this may REALLY help) the gallery trips when trying to generate the medium image and the thumbnail. This leads me to believe there is a file size limit on whatever script/software is used to generate the thumbnails. At this point the gallery fails and does not index the file - if it did, i could have added my own thumbs :(
Please please help!
Please help! The idea was to host high quality images of vintage computers, they need to be over 2 megs (mostly).
« Last Edit: November 15, 2008, 06:28:16 pm by greatflash »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16355
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #9 on: November 15, 2008, 06:40:55 pm »
For over 2megs I would talk to your host if they can increase the upload settings for php for your account and that would fix the issue.
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 #10 on: November 15, 2008, 06:57:40 pm »
The files ARE uploading.. They are in the gallery directory and full size.
Problem is, the thumbnails and medium images are not being generated, that is where the gallery upload fails.

I can assure you 100% that the images upload fine.. When the gallery comes to the part where it would normally return to the gallery view and display the uploaded images thumbnail, it fails! the browser sits there with a white screen and either says waiting (and never completes) or just shows "Done" in the status bar.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16355
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #11 on: November 15, 2008, 07:17:17 pm »
Anything inside the error log of your forum?
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 #12 on: November 15, 2008, 07:52:03 pm »
No, nothing!

It is 100% a problem with filesize limitations on whatever is used to created the other sized images.
4Images has the same problem. If an image is too big, the thumbnails cannot be created. Luckily, it allows you to also upload your own thumbs and this solves it. 4images does not trip over on creating the thumbs, it seems they have put a trap in the code to jump out upon error. The smf gallery appears to try to carry on regardless.

The size appears to be around 3 megs.

Easy way to try is to create a png of 4 megs and try to upload it. Please try for me and see if you get the same result.

Thanks for all your help!

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16355
    • View Profile
Re: Help:Fatal error: Allowed memory size of 50331648
« Reply #13 on: November 15, 2008, 07:54:45 pm »
You can try to modify the core of SMF's graphics
Open Source/Sub-graphics.php
Find
Code: [Select]
@ini_set('memory_limit', '48M');
Change to
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 #14 on: November 15, 2008, 07:57:09 pm »
I had done that already - cured the php error!

What is used to create the thumbnails - that is where the problem lies - it is the image resizer!

I am sure..

Trust me - i'm a doctor (well, not really)

 

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