WordPress.org

Ready to get started?Download WordPress

Forums

Fatal error: Out of memory /wp-includes/media.php on line 258 (8 posts)

  1. brettlewis
    Member
    Posted 2 years ago #

    I have run into problems with mem limits before but but haven't found a solution to this specific problem yet. I am using wp-ecommerce which uses the default media uploader to upload product photos. When I go to the product image gallery (or standard media gallery) I get the dreaded error

    Fatal error: Out of memory (allocated 40894464) (tried to allocate 4096 bytes) in /home/blahblah/public_html/wp-includes/media.php on line 258

    I have increased all my mem limits to 256M a while back when I ran into plugin related mem issues, but this didn't fix my new problem.

    If I go to media.php and check out line 258 and remove it (and its related code) the issue goes away and I can once again upload and manage photos. However, I know this isn't a solution to the problem.

    What else can I do to stop this. Are there any definitions I can add to config to stop this? right now my max and limit is set at 256M in config and when I call to my php.ini settings from my different directories it shows a limit of 256M. I thought this would suffice, but can't figure out a fix.

    Thanks!

  2. brettlewis
    Member
    Posted 2 years ago #

    Don't want to get too buried. Any advice or links to help? I've tried a few mem stuff as stated above but looks like I need some sort of config fix instead.

    Thank in advance

  3. brettlewis
    Member
    Posted 2 years ago #

    So I'm posting again looking for solutions. My hosting provider seems to think there is no issue. It clearly is an issue because it is happening across all my resold hosting accounts. Not exactly sure what to try next. I have tried everything I have found on this forum so far and nothing has worked.

  4. delpkeno
    Member
    Posted 1 year ago #

    Thought I'd see if you solved this. I am getting the same issue.
    I've wordpress 3.41 and I'm hosting with 1&1 on a shared server.

    I can't even upload really small images.

    This is the message I get when trying to upload a 21KB JPG image.
    Fatal error: Out of memory (allocated 29884416) (tried to allocate 850 bytes) in /homepages/.../htdocs/word/wp-includes/media.php on line 258

    I've also tried using NextGen gallery and it fails when uploading images or even importing a folder that already has images inside it (this might be unrelated - I'm not sure)

  5. africaspotter
    Member
    Posted 1 year ago #

    Hi all,

    same problem here! I am on 1&1 as well and it worked fine the first days. Now I am suddenly getting the error? What can I do? Which part of the media.php do I have to delete?

    Cheers,

    Felix

  6. delpkeno
    Member
    Posted 1 year ago #

    I'm afraid from what I've found it is a 1&1 issue. Their shared hosted accounts are just rubbish.
    I couldn't upload images for about a fortnight, then I was so hacked off and everything was pointing at 1&1 issues and not php or ini files etc that I was about to phone them so right before I did I gave it one last try and it worked. I managed to upload a single image! Then I managed to upload a few! then it broke again, but I managed to upload a few images at a time so I'm now just looking at moving hosts.

  7. delpkeno
    Member
    Posted 1 year ago #

    You could try a different plugin depending on what you are doing (I got one gallery plugin to work with a few images at a time, but another just wouldn't work at all) or maybe even use FTP and hand craft whatever pages you are trying to do.

  8. africaspotter
    Member
    Posted 1 year ago #

    It is not the first time that 1&1 is making problems... Maybe I should just change my provider!

    Thanks for looking into it!

    Felix

Topic Closed

This topic has been closed to new replies.

About this Topic