Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4260
Latest: Verrick
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 43333
Total Topics: 7528
Most Online Today: 220
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 57
Total: 58

Author Topic: Help:Fatal error: Allowed memory size of 50331648  (Read 29278 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: 16468
    • 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: 16468
    • 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: 16468
    • 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: 16468
    • 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: 16468
    • 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
4160 Views
Last post July 03, 2007, 11:32:53 pm
by djrichards
2 Replies
22513 Views
Last post January 07, 2008, 02:36:45 am
by Arie.
3 Replies
4787 Views
Last post February 06, 2008, 02:07:58 pm
by MoreBloodWine
2 Replies
6215 Views
Last post May 09, 2009, 10:58:39 am
by SMFHacks
4 Replies
3107 Views
Last post November 22, 2011, 12:13:11 pm
by jstop

+- Recent Topics

Site upgrade to 2.1 by SMFHacks
July 12, 2024, 07:47:03 am

Issues with Pretty URLs 4.1 by Randem
June 27, 2024, 07:32:22 pm

Failed to open stream: File name too long by Randem
June 26, 2024, 02:13:37 pm

Attachment images Upsidedown or Sideways by SMFHacks
June 18, 2024, 10:53:24 am

JSON decode error: The maximum stack depth has been exceeded by SMFHacks
June 14, 2024, 10:15:16 pm

“Insert from Gallery” by donk
June 10, 2024, 01:26:57 pm

Pretty Urls extras by SMFHacks
May 13, 2024, 10:28:54 am

Mod question by Verrick
May 11, 2024, 02:42:50 pm

i have paid but cant download ad pro. by SMFHacks
May 02, 2024, 11:29:38 pm

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Powered by EzPortal