• Resolved morkus_wp

    (@morkus_wp)


    Hello,

    Although the site itself seems to work fine, I’m having a strange problem when I try to click an edit button inside a page. I get a memory error like this:

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 3072 bytes) in public_html/wp-admin/includes/plugin.php on line 1854

    —-

    A 32M Error is really confusing since my php.ini file has this:

    memory_limit = 256M
    upload_max_filesize = 4M

    (Note: “php info” told me that the config file in public_html is the one being read….the one with the contents directly above.

    —-

    And, my wp-config.php file has this:

    define( ‘WP_MAX_MEMORY_LIMIT’, ‘256M’ );

    For whatever reason there’s also a php.ini file in wp-admin, but it too has the “memory_limit = 256M” line in it.

    I’m therefore baffled where WP is coming up with the 32M for script memory and then, of course, failing as it did above.

    Suggestions would be greatly appreciated.

    Thanks,

    – b

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator James Huff

    (@macmanx)

    It looks like your server is forcing 32M on you. First, just a few clarifications:

    1. The primary php.ini you stated should be working.

    2. The wp-config.php increase was deprecated. WordPress now tries to use as much of PHP’s allocated memory as it needs.

    3. The php.ini file can only be in either the server or account root. A php.ini file in the wp-admin directory won’t do anything, unless the server has a really weird configuration.

    I recommend contacting your hosting provider about this, ask them to increase it to 128M instead of 256, and see what they can do for you.

    Thread Starter morkus_wp

    (@morkus_wp)

    Thanks James for your reply. ??

    I read on some sites that having a php.ini file in each folder helped some people, but what actually solved the 32M “Memory Exhausted” problem for me was to disable the “Jetpack” plug-in the previous developer added.

    (not sure why this plug-in was added to the site at all.)

    I was at the point where I needed to just start disabling things and see if anything there would help. The Jetpack plug-in was first on the list and viola that fixed it!

    I had also added one of the memory plug-ins which said, yes, I had 256 M of memory of which only about 40M was being used. Very confusing to have a memory error given this low memory consumption.

    But it’s all good now.

    Thanks again!

    – m

    Moderator James Huff

    (@macmanx)

    You’re welcome!

    MarkRH

    (@markrh)

    FYI, if you make a info.php file with the following:

    <?php
    phpinfo();
    ?>

    into your blog’s directory and then run it, the Loaded Configuration File will tell you where it’s reading the PHP.INI file from and what the memory_limit is.

    Thread Starter morkus_wp

    (@morkus_wp)

    Thanks Mark.

    As I mentioned in my original posting, I did create the php info file. That made the situation all that more confusing since the correct php.ini file was being read.

    In any case, I got it fixed by disabling a plug-in.

    Thanks again. ??

    – m

    Moderator James Huff

    (@macmanx)

    The folks at Jetpack would probably love to know that it was using so much memory too. ??

    https://www.ads-software.com/support/plugin/jetpack

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Memory Issue when trying to edit page’ is closed to new replies.