Forums

Fatal Error During Photo Upload (24 posts)

  1. justbishop
    Member
    Posted 1 year ago #

    I'm getting this error when uploading photos (well within the 8MB limit displayed in the photo upload popup) into posts:

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 14592 bytes) in /home/*****/public_html/wp-includes/media.php on line 253

    I did search, and have tried fixes 0-3 suggested by MichaelH fixes from thread in THIS thread. Below are the results:

    0. changed nothing. Still getting same error on photo upload

    1. no access to PHP.ini

    2. gives me an internal server error

    3. changed nothing. Still getting same error on photo upload

    Suggestion number 4 is to talk to the site's host. It's a client site, so she'll have to do that. Can anyone tell me exactly what she needs to ask them to do? I thought it would be something like "can I please get my php memory limit increased", but I'm not sure if that's the correct terminology. Also, if it IS, what should she ask for it to be increased to?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Suggestion:
    "What is the current php memory allocated to applications on my domain/server? Can this be increased?! [ include error message]"

  3. justbishop
    Member
    Posted 1 year ago #

    Awesome, thanks ;)

  4. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    No probs. :-)

  5. justbishop
    Member
    Posted 1 year ago #

    Um, OK...client asked her host to increase the limit, which they did (to 64M). They also put a copy of php.ini in her folder, so I now have access to that. I was still getting the error with the limit set to 64, so I changed it to 128 in php.ini. STILL GETTING THE ERROR!!

    Do I just keep upping it until it works? This is a clean install with maybe 2 or 3 plugins and a new theme running. I don't understand what the issue could possibly be!

  6. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Only one way to know for sure - switch to TwentyTen and deactivate the few plugins running to see if that helps.

  7. justbishop
    Member
    Posted 1 year ago #

    esmi: thanks, that'll definitely be something I try if all else fails

    Ipstenu: thanks for the link, there are some things in there that I haven't tried yet. will mess with it tomorrow :)

  8. justbishop
    Member
    Posted 1 year ago #

    Ipstenu: Just checked, and I'm not seeing ANY of the lines of code talked about in the thread you linked to in ANY of the files mentioned there :/

    ETA: also, I have no plugins activated or even installed (even deleted Askimet and Dolly), and am still having the issue with the 2010 theme activated.

    ETAA: The host server is running PHP 5.2.6

  9. justbishop
    Member
    Posted 1 year ago #

    Ok, I've not only activated the 2010 theme, but also deleted the one other theme that was installed (Pure2Pro), and am still getting the error mentioned in my OP!

    I don't understand! This is a cleaner than fresh install, as I've even gotten rid of the default plugins! GAH!

  10. justbishop
    Member
    Posted 1 year ago #

    So...I guess I'll try a full reinstall, if no one has any other thoughts?

  11. If you're not going to lose anything, I would reinstall. See if you can upload images on a virgin WordPress. Do you have other wordpress installs on the same server?

  12. Thejas Kamath
    Member
    Posted 1 year ago #

    You try to increase the memory size limit. You can follow the steps below which was posted by Samuel B in different Thread.

    1. Try adding this line to your wp-config.php file:
    define('WP_MEMORY_LIMIT', '128M');
    
    2. If you have access to your PHP.ini file, change the line in PHP.ini
    If your line shows 32M try 128M:
    memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)
    
    3. If you don't have access to PHP.ini try adding this to an .htaccess file:
    php_value memory_limit 128M
    
    4. Talk to your host.

    Thanks

  13. justbishop
    Member
    Posted 1 year ago #

    ipstenu: yeah, it was a new install in the design/testing phase anyway, so it's not too big a deal. I'm just terrified of what happens if I get the same error on a vanilla install :(

    Thejas Kamath: ...um, please read my OP.

  14. Reuben Gunday
    Member
    Posted 1 year ago #

    After increasing the memory in php.ini you need to restart apache to take effect.

  15. justbishop
    Member
    Posted 1 year ago #

    OK, still happening on a totally vanilla install. HOWEVER...I've uploaded various pictures, and some of them DO work (this was also the case before the reinstall, though). Doesn't seem to have anything to do with size. Some of the <100 kb images I've uploaded create the error after the "crunching" stage, and some of the 1-2 mb pictures I've uploaded do just fine.

    Any ideas? The client I'm building the site for is a graphic artist, so being able to reliably upload photos is pretty important to her!

  16. Reuben Gunday
    Member
    Posted 1 year ago #

    I guess you need atleast 256M memory....Wordpress tries to set to that while uploading but edit your php.ini and see if it works.

  17. Thejas Kamath
    Member
    Posted 1 year ago #

    Try to use a plugin. The name of the plugin is Flexible Upload. This may solve your upload problem.

    Thanks

  18. justbishop
    Member
    Posted 1 year ago #

    Reuben: How would I reset Apache? Is that something the host needs to do? I just set memory to 256M in php.ini as well as wp-config, and am still getting the error.

    Thejas Kamath: looks like a good plugin, but it says it's only compatible up to WP 2.5?

  19. Thejas Kamath
    Member
    Posted 1 year ago #

    I will get to back to you soon.

  20. justbishop
    Member
    Posted 1 year ago #

    Just wanted to check and see if there were any more suggestions on this issue other rhan a host switch (which the client is not willing to do)? Is the memory limit for image uploading hardcoded anywhere else, maybe?

  21. josiahgoff
    Member
    Posted 1 year ago #

    I'm having the exact same problem and have tried all of the suggested fixes. I really need to find a solution quick because the site I'm working on needs to be launched this weekend.

  22. justbishop
    Member
    Posted 1 year ago #

    Just wanted to add that the host has increased the memory limit to 64M, I believe, so it's obviously something within WordPress causing the problem.

  23. josiahgoff
    Member
    Posted 1 year ago #

    I just used apple preview to resize an image that wasn't uploading. I only made it a bit smaller (1024x786) and then saved it. The new file uploaded fine. You might want to try that and see if it works for you. If it does then it may be that wordpress doesn't like the compression type of the images we were trying to upload. I know this doesn't fix the problem, but it at least gives a temporary solution until we can figure out what the root cause is. Let me know if it works for you.

Topic Closed

This topic has been closed to new replies.

About this Topic