• Resolved sprocker

    (@sprocker)


    I am getting the following errors:

    mod_fcgid: stderr: PHP Warning: A non-numeric value encountered in /var/www/vhosts/domainname.co.uk/httpdocs/wp-includes/media.php on line 468

    mod_fcgid: stderr: PHP Warning: A non-numeric value encountered in /var/www/vhosts/domainname.co.uk/httpdocs/wp-includes/media.php on line 458

    I have tried the site with no plugins and the basic theme but I keep getting the warning…

    Also added this to the config file:
    ini_set(‘display_errors’,’Off’);
    ini_set(‘error_reporting’, E_ALL );
    define(‘WP_DEBUG’, false);
    define(‘WP_DEBUG_DISPLAY’, false);

    WordPress and Plugins all up to date

    What can be causing this? how do I stop it? thanks

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator t-p

    (@t-p)

    This is a scripting error. It seems like something or somebody modified your media.php file and now is broken.

    Therefore, adding the display errors:off script in your config file wont do anything because its a core script error and not part of the error logs.

    Follow the path this error is giving you, than copy what is on that line and post it here and tag me. I will take a look and see the issue more in depth.

    Thread Starter sprocker

    (@sprocker)

    thanks!!!
    first error:

    // Calculate the larger/smaller ratios.
    $smaller_ratio = min( $width_ratio, $height_ratio );
    $larger_ratio = max( $width_ratio, $height_ratio );

    ==> 458: if ( (int) round( $current_width * $larger_ratio ) > $max_width || (int) round( $current_height * $larger_ratio ) > $max_height ) {
    // The larger ratio is too big. It would result in an overflow.
    $ratio = $smaller_ratio;
    } else {
    // The larger ratio fits, and is likely to be a more “snug” fit.
    $ratio = $larger_ratio;
    }

    Second error:

    // Very small dimensions may result in 0, 1 should be the minimum.
    $w = max( 1, (int) round( $current_width * $ratio ) );
    ==> 468 $h = max( 1, (int) round( $current_height * $ratio ) );

    Thread Starter sprocker

    (@sprocker)

    Thanks for the advice!

    Turned out it was some old core code that was no longer needed in the later versions of WordPress that was triggering the error.

    Very impressed with my host, 34sp for getting to the bottom of it and sorting it for me!

    Moderator t-p

    (@t-p)

    Glad its sorted ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Log errors causing high server usage’ is closed to new replies.