-3

I am having some issues with my website. I originally had:

Fatal error: Allowed memory size of x bytes exhausted

but after I tried to fix that I now have a new error and I just can't figure out what is wrong.

So here is the error message: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRINGin/data/9/3/38/56/3038056/user/3375037/htdocs/healteam6/wp-includes/default-constants.php on line 45

and here is the code below.

<?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
 */
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 );
/**#@-*/

$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', ‘128M' );
    }
}

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' );
    }
}

// Set memory limits.
$wp_limit_int = wp_convert_hr_to_bytes( WP_MEMORY_LIMIT );
if ( -1 !== $current_limit_int && ( -1 === $wp_limit_int || $wp_limit_int > $current_limit_int ) ) {
    @ini_set( 'memory_limit', WP_MEMORY_LIMIT );
}

if ( ! isset($blog_id) )
    $blog_id = 1;

if ( !defined('WP_CONTENT_DIR') )
    define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down

// Add define('WP_DEBUG', true); to wp-config.php to enable display of notices during development.
if ( !defined('WP_DEBUG') )
    define( 'WP_DEBUG', false );

// Add define('WP_DEBUG_DISPLAY', null); to wp-config.php use the globally configured setting for
// display_errors and not force errors to be displayed. Use false to force display_errors off.
if ( !defined('WP_DEBUG_DISPLAY') )
    define( 'WP_DEBUG_DISPLAY', true );

// Add define('WP_DEBUG_LOG', true); to enable error logging to wp-content/debug.log.
if ( !defined('WP_DEBUG_LOG') )
    define('WP_DEBUG_LOG', false);
halfer
  • 19,824
  • 17
  • 99
  • 186

1 Answers1

1

This line here:

define( 'WP_MEMORY_LIMIT', ‘128M' );

Right before the 128M there is a fancy quote, change it to a proper one:

define( 'WP_MEMORY_LIMIT', '128M' );
Enstage
  • 2,106
  • 13
  • 20