WordPress.org

Ready to get started?Download WordPress

Forums

Memory exhausted in functions.php when add media (10 posts)

  1. cma8888
    Member
    Posted 5 years ago #

    I am creating and testing WP site on localhost (WP2.9.1, SlidingDoor theme) and fatal error appears whenever I add/upload media/files. Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 261900 bytes) in C:\xampp\htdocs\wordpress\wp-includes\functions.php on line 1953.

    I tried every suggestion in the forum to increase memory limit (ie. php.ini, .htaccess, wp-settings.php, wp-config.php, image.php...). I even inflated the values to 1000M in couple of the .php files. Tried deactivating plugins. Also tried different media (1kb jpegs, 20kb pdfs...) and the problem still exists.

    Any ideas and suggestions would be greatly appreciated. My WP site provides a lot of pdfs for visitors to download, so especially important to solve this. Is there any way to bypass this problem? Thanks in advance.

  2. ipunkbali
    Member
    Posted 5 years ago #

    Im not an expert but I had that problem before. I contacted my hosting company and they fix it. Tell 'em your problem.

  3. cma8888
    Member
    Posted 5 years ago #

    Thanks for your feedback but I am creating and testing my site on localhost so the site is not online yet (as mentioned in original post). In that case, is there something that I can tweak in the server files since the files are stored locally on my computer?
    Any help would be much appreciated. Anyone?

  4. Mark / t31os
    Moderator
    Posted 5 years ago #

    Increase the memory limit in php.ini

    See here for configuration file locations.
    http://www.apachefriends.org/en/xampp-windows.html#1172

  5. cma8888
    Member
    Posted 5 years ago #

    Thanks but tried that too (as in original post). Increased the value to 5000M, still the same problem.

  6. Mark / t31os
    Moderator
    Posted 5 years ago #

    Sorry... guilty of skimming ...

    The error is being generated by a WordPress function that creates directories, perhaps there's a permissions issue that's causing it to error...

    Do you have an uploads directory? If not, create it, if so, check the permissions..

  7. cma8888
    Member
    Posted 5 years ago #

    I have no complaints, t31os. Just glad that good people like yourself are offering help.
    I do have an uploads directory. Folder is read-only by default. Uncheck read-only option and applied changes. The setting returned to checked state. Doesn't seem to allow user to change permission.

  8. Mark / t31os
    Moderator
    Posted 5 years ago #

    I don't have this problem locally myself, so i'm out of ideas..

    Perhaps try re-creating the folder, as an idea... (it might not help at all)

  9. mgoforth
    Member
    Posted 4 years ago #

    I had a similar problem and it works after making wp-content/* writable.

  10. mgoforth
    Member
    Posted 4 years ago #

    I had a similar problem and it works after making wp-content/* writable.

  11. mgoforth
    Member
    Posted 4 years ago #

    I had the same problem and it works now after changing wp-content/* to writable.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic