• Hi,

    I am receiving multiple fatal errors when I try to edit my archives page. The last time I was to update the page was October 31, 2019. When trying to update for November 30, 2019, the following errors started appearing:
    Fatal error: Out of memory (allocated 547880960) (tried to allocate 1052672 bytes) in /homepages/46/d192996334/htdocs/XXXXXXX/XXXXX/wp-includes/wp-db.php on line 1995

    Warning: call_user_func() expects parameter 1 to be a valid callback, no array or string given in /homepages/46/d192996334/htdocs/XXXXXXX/XXXXX/wp-includes/functions.php on line 3291

    I do not have direct access to the cpanal and the host is unable to figure out the issue. The way I have been accessing the admin files is by using wp-file manager that I keep uninstalling due to security concerns.

    Suggestions to resolve this issue would be appreciated.

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @efran1526 ,

    I suspect there are many loop/process on that side, try to increase the PHP memory limit to 512MB (just in case).

    if you can acces & edit wp-config.php, try to active the wp_debug so you can see the exact error (it should be), here how to do:
    https://codex.www.ads-software.com/WP_DEBUG

    547880960 522,5 MEGA BYTES, you need more value than this 547880960+1052672= 523.50390625 MEGA BYTES
    https://github.com/WordPress/WordPress/blob/4.2-branch/wp-includes/wp-db.php#L1995
    please lack information, WordPress version used, php in use if you are using an original copy, you have a wordpress version modified by your hosting (ask your hosting).
    On line 1995 I found correspondence from WordPress 4.2 to 5.3 in WordPress 4.2.
    for a complete understanding , i that the initial error is in call_user_func exactly to that line 3291 of code (it means WordPress 5.3) https://github.com/WordPress/WordPress/blob/5.3-branch/wp-includes/functions.php#L3291
    If you have backups of the files and the database, simply use the php file_get_contents function with the local absolute path to recover the code.
    However you have 522 MEGA BYTES in your database and for php there are too many, it can be a theme or plugin conflict, after the backup deactivate all the plugins and go to the default theme one of the twenty installable.

    Thread Starter efran1526

    (@efran1526)

    Thank you for the information but I just discovered that this particular page is corrupt. On the right side of page there is information that I never put on this page and i’m just now seeing it. https://www.arvfd.ca/call-activity-archives/

    Unless there is a tool that will allow me to access this page to edit it, I think I have no other choice other than recreate it.

    Thank you again for your help.

    can you share what’s on line /homepages/46/d192996334/htdocs/XXXXXXX/XXXXX/wp-includes/wp-db.php on line 1995? https://github.com/WordPress/WordPress/blob/4.2-branch/wp-includes/wp-db.php#L1995
    I’m thinking that you have permission problems and unfortunately you can’t update correct via Dashboard.
    Ask your hosting what to do in this case.

    Thread Starter efran1526

    (@efran1526)

    This is line 1995 in wp-dp.php.

    1995 while ( $row = mysqli_fetch_object( $this->result ) ) {

    ok you’re using WordPress 5.3

    //for administration
    define( 'WP_MAX_MEMORY_LIMIT', '1024M');

    for other info https://www.ads-software.com/support/article/editing-wp-config-php/#increasing-memory-allocated-to-php
    otherwise if your hosting allows it you can use php.ini or htaccess, ask your hosting.
    see if this solves your problem

    Thread Starter efran1526

    (@efran1526)

    where do i apply this: //for administration
    define( ‘WP_MAX_MEMORY_LIMIT’, ‘1024M’);

    this is what appears at the beginning of /wp-includes/default-constants.php:

    <?php
    /**
    * Defines constants and global variables that can be overridden, generally in wp-config.php.
    *
    * @package WordPress
    */

    /**
    * Defines initial WordPress constants
    *
    * @see wp_debug_mode()
    *
    * @since 3.0.0
    *
    * @global int $blog_id The current site ID.
    * @global string $wp_version The WordPress version string.
    */
    function wp_initial_constants() {
    global $blog_id;

    /**#@+
    * Constants for expressing human-readable data sizes in their respective number of bytes.
    *
    * @since 4.4.0
    */
    define( ‘KB_IN_BYTES’, 1024 );
    define( ‘MB_IN_BYTES’, 1024 * KB_IN_BYTES );
    define( ‘GB_IN_BYTES’, 1024 * MB_IN_BYTES );
    define( ‘TB_IN_BYTES’, 1024 * GB_IN_BYTES );
    /**#@-*/

    // Start of run timestamp.
    if ( ! defined( ‘WP_START_TIMESTAMP’ ) ) {
    define( ‘WP_START_TIMESTAMP’, microtime( true ) );
    }

    $current_limit = ini_get( ‘memory_limit’ );
    $current_limit_int = wp_convert_hr_to_bytes( $current_limit );

    // Define memory limits.
    if ( ! defined( ‘WP_MEMORY_LIMIT’ ) ) {
    if ( false === wp_is_ini_value_changeable( ‘memory_limit’ ) ) {
    define( ‘WP_MEMORY_LIMIT’, $current_limit );
    } elseif ( is_multisite() ) {
    define( ‘WP_MEMORY_LIMIT’, ’64M’ );
    } else {
    define( ‘WP_MEMORY_LIMIT’, ’40M’ );
    }
    }

    if ( ! defined( ‘WP_MAX_MEMORY_LIMIT’ ) ) {
    if ( false === wp_is_ini_value_changeable( ‘memory_limit’ ) ) {
    define( ‘WP_MAX_MEMORY_LIMIT’, $current_limit );
    } elseif ( -1 === $current_limit_int || $current_limit_int > 268435456 /* = 256M */ ) {
    define( ‘WP_MAX_MEMORY_LIMIT’, $current_limit );
    } else {
    define( ‘WP_MAX_MEMORY_LIMIT’, ‘256M’ );
    }

    it is not a good idea to change the core because with the update it is restored to the current code.
    Obviously you can change the value '256M' to '1024M' also in default_constants.php but a good coding indicates to create the constants before the require_once wp-settings.php of the wp-config.php file.
    For other info https://www.ads-software.com/support/article/editing-wp-config-php/#increasing-memory-allocated-to-php

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Multiple Fatal Errors’ is closed to new replies.