[Defender] File Scanning

Hi. My File Scanning is stalling at around 25% and doesn't get past that. I read something similar on cummunity forum, but can you assist on this?

Thanks,
John

  • Ash
    • WordPress Hacker

    Hello John

    It seems there is an error produced while the file scanning was running. Would you please enable debug mode and check if there is any error? To enable debug mode please go to wp-config.php and change

    define( 'WP_DEBUG', false );

    to

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_DISPLAY', false );
    define( 'WP_DEBUG_LOG', true );

    Now run the scan again. That will create a file called debug.log inside wp-content folder. Open that file, check the very bottom and you will see the latest errors. Please send me those.

    Have a nice day!

    Cheers,
    Ash

  • MichaelT
    • New Recruit

    Hello Ash,
    I had the same problem as John, followed your steps listed above and got this error:

    [28-Aug-2018 22:23:28 UTC] PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 36 bytes) in ....wordpress/wp-content/plugins/wp-defender/vendor/php_codesniffer/CodeSniffer/File.php on line 2404

    The code starting on line 2404 is;
    $numTokens = count($tokens);
    $level = 0;
    $conditions = array();
    $lastOpener = null;
    $openers = array();

    Can you help me? Thank you!
    Michael T

    • Ash
      • WordPress Hacker

      This is memory issue. You have very low memory limit - 64M.

      Please add the following in wp-config.php:

      define( 'WP_MEMORY_LIMIT', '256M' );
      define( 'WP_MAX_MEMORY_LIMIT', '256M' );

      If it still doesn't work, please ask your host to increase the memory limit to 256M at least.

      Have a nice day!

      Cheers,
      Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.