ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Allowed memory size problem

February 09, 2012 11:39am

Subscribe [7]
  • #1 / Feb 09, 2012 11:39am

    Ruslan Ka

    63 posts

    This question may be related to a resolved thread.

    I did go through several pages about the same issue but my limit is 64MB, and I’m still getting the issue.

    v2.3.1 - Build: date 20111017

  • #2 / Feb 09, 2012 12:02pm

    box-head

    177 posts

    I’ve gotten this problem when using the ImgSizer plugin when it has loads of large (in Mb) images to deal with on the same page.

    What pages are you noticing the problem on? Is it a specific template, or is it in the control panel?

    Can you think of any plugins or modules that might be having to do a lot of work?

  • #3 / Feb 09, 2012 12:07pm

    Ruslan Ka

    63 posts

    It’s just File Manager…

  • #4 / Feb 10, 2012 1:52pm

    Shane Eckert

    7174 posts

    Hell Ruslan Ka,

    I am sorry to hear you are running into this problem.

    Can you show me the error that you are receiving?

    If I were to guess before seeing the specific error, I would say that your php memory_limit is set correctly.

    memory_limit sets the maximum amount of memory in bytes that a PHP script is allowed to allocate.

    You can also set max_execution_time. This sets the maximum time in seconds a PHP script is allowed to run before it is terminated by the parser. So if you have a rather large file that takes a few more seconds to upload than you have allotted, it will not upload successfully.

    Please let me know about the error you are seeing and if max_execution_time helps you.

    Cheers,

  • #5 / Feb 10, 2012 1:57pm

    Matt Stein

    110 posts

    I have a vague feeling I’ve run into this several times. If I recall correctly, PHP and Apache both have separate memory limits. In the past, I’ve had to up memory limits in more than one place to fix the problem.

  • #6 / Feb 10, 2012 2:06pm

    Shane Eckert

    7174 posts

    Hi Matt,

    Thanks for your input!

    There really should be no need to edit an Apache configs for what we are doing here. Long story short, we really only care about php.ini.

    Cheers,

     

  • #7 / Feb 11, 2012 1:44pm

    Ruslan Ka

    63 posts

    Hi, thanx guys for input , this is what I get.

    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 27336960 bytes) in /home7/thecgblo/public_html/corporategames/system/codeigniter/system/libraries/Image_lib.php on line 1164

    I found some post which talks about the same issue and the guy was same as me on the Bluehost. The problem is that I don’t have an access from the client to the root FTP folder, so I cannot access public_html folder and php.ini there.

    http://ellislab.com/forums/viewthread/138066/_


    and where should I set
    max_execution_time

    in php.ini or I can do it in .htaccess file
    and how should it be done

  • #8 / Feb 11, 2012 2:15pm

    Shane Eckert

    7174 posts

    Hello Ruslan Ka,

    In that case you will want to work with your hosting provider and have them make the change for you.

    max_execution_time is set in php.ini as well.

    When you contact BlueHost, ask them to make any more changes they deem necessary based on the error. There are a few more setting you can tweak in php.ini to account for uploads, but typically you do not need to change those.

    Cheers,

  • #9 / Feb 11, 2012 3:58pm

    Ruslan Ka

    63 posts

    Thank you will give it a try…

  • #10 / Feb 12, 2012 6:16am

    Ruslan Ka

    63 posts

    Just got an access to the public_html folder , and installed php.ini file.

    found the following

    ;;;;;;;;;;;;;;;;;;;
    ; Resource Limits ;
    ;;;;;;;;;;;;;;;;;;;

    max_execution_time = 90   ; Maximum execution time of each script, in seconds
    max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
    memory_limit = 128M     ; Maximum amount of memory a script may consume (16MB)

    I have changed the
    max_execution_time to 90
    and memory limit from 64 to 128.

    But I think there is no effect because of the comment on the right side. So I assume it is still going to be 16 MB. Am I right ?

  • #11 / Feb 13, 2012 5:26pm

    Shane Eckert

    7174 posts

    Hello Ruslan Ka,

    I would like to clarify the location of php.ini.

    Typically it’s going to be in a path that starts with /etc/ or sometimes /usr/

    For example I have seen it in all of the following locations depending on the server OS:

    /etc/php.ini
    /etc/php/php.ini
    /etc/php5/php.ini
    /etc/php5/apache2/php.ini

    If you are on a hosted server, it’s likely that you do not have access to the php.ini file. This is something the Systems Administrator at your provider will need to update for you. The changes to the php.ini file are reflected server-wide.

    I believe you mentioned BlueHost, you will need to call their tech support or open a ticket with them to get that file updated.

    Does that makes sense?

    Cheers,

  • #12 / Feb 14, 2012 1:22am

    Ruslan Ka

    63 posts

    yes, it does…

    Thanx Shane.

  • #13 / Feb 14, 2012 7:53am

    silenz

    1651 posts

    Another approach would be to find the image(s) that cause(s) trouble.

    Have you any particularly large images in your upload directory?

    Large does not only means file size but also dimensions. A 4000 x 3000 pixel JPG can easily topple the 64MB limit even if it’s just some KB big.

  • #14 / Feb 15, 2012 2:53pm

    Shane Eckert

    7174 posts

    Hey Ruslan Ka,

    I am glad it makes sense. I know that server configurations can be tricky if you do not deal with them on a daily basis. Hopefully your provider can help you with this rather quickly.

    Let me know if there is anything else I can help with or any questions I can answer!

    Cheers

  • #15 / May 16, 2012 9:40am

    pmerritt

    24 posts

    I’m having the same problem uploading images. My host has increased my size limit but it has not had an effect. I’m wondering about the comment from the lab technician. The photos I’m trying to upload are all in the 4000 px wide range. Can you provide more details on how the dimensions of a photo would overload the upload limit independently from the actual file size? Is there a way around this problem?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases