Local_Conf.php Errors

I am getting error in my logs for lines 5 and 15. Below is the file with my IPs removed. Any idea what is causing this "PHP Notice: Undefined index: REMOTE_ADDR in MYFILEBELOW)?

<?php

//@ini_set(‘memory_limit’, ‘2048M’);

if (($_SERVER[‘REMOTE_ADDR’] == ‘IP1.xxx.xxx’)||($_SERVER[‘REMOTE_ADDR’]==‘IP2.xxx.xxx’)) {
//define(‘DEVELOPMENT’, true);
error_reporting(E_ALL);
//ini_set(‘display_errors’, ‘On’);
//define(‘DEBUG_MODE’, true);
//define(“DEBUG_QUERIES”, true);
}

if ($_SERVER[‘REMOTE_ADDR’] == ‘IP3.xxx.xxx’) {

// Turn on the Debug mode for the admin panel and the storefront
define('DEBUG_MODE', true);

// Use the Development mode to display errors
define('DEVELOPMENT', true);

// Display SMARTY and PHP errors on the screen.
error_reporting(E_ALL);
ini_set('display_errors', 'on');
ini_set('display_startup_errors', true);

// Disable PHP block caching
$config['tweaks'] = array (
    'disable_block_cache' => true,
);

}

I should note that it looks like the file was changed last month and I don't recall doing this (though I possibly could have). The reason I noticed this today was my site crashed due to being bombarded by some IP that overloaded the server. Does this file have anything funny looking in it?

REMOTE_ADDR cannot be defined due to server configuration. Please contact hosting administrator with this issue

Man, things are just getting worse. Site keeps getting slower and slower today. Besides seeing the error above (contacted host about it) I am also seeing:

Allowed memory size of 134217728 bytes exhausted (tried to allocate 130968 bytes) in /home/fastdeca/public_html/shop/app/Tygh/Registry.php on line 998

What I don't understand about this error is that file only goes to line 510. This error and the error below are happening several times a minute.

Another error in Database.php on line

return self::process($pattern, $args, false);

And one I have seen a few other times in the last few days:

PHP Warning:  number_format() expects parameter 2 to be long, string given in /home/fastdeca/public_html/shop/app/functions/fn.cart.php on line 4260

In the config.local.php file try to add

@ini_set('memory_limit', '512M');

before

if (!defined('CONSOLE')) {

In the config.local.php file try to add

@ini_set('memory_limit', '512M');

before

if (!defined('CONSOLE')) {

Right now in that area I have:

// Set maximum memory limit
if (PHP_INT_SIZE == 4 && (substr(ini_get('memory_limit'), 0, -1) < "128")) {
  // 32bit PHP
  //@ini_set('memory_limit', '128M');
} elseif (PHP_INT_SIZE == 8 && (substr(ini_get('memory_limit'), 0, -1) < "512")) {
  // 64bit PHP
  //@ini_set('memory_limit', '512M');
}

Not real sure what all that means. Can't really do anything right now as my site has been slow or unresponsive for like 3 days now. Been totally shut down for the last 24 hours. Host can't seem to figure it out. They just keep telling me I have high server load but can't explain the issue. The amount I pay for my VPS shouldn't have a problem with load at 10x the traffic I have. If they get the site to come live it gets slow within a few minutes and crashes a few minutes later.

Did you try to add code from my post? At the moment default values are disabled by someone

Did you try to add code from my post? At the moment default values are disabled by someone

I have not because: 1. I'm not sure where to put it since that part of the code is disabled for some reason. 2. I still have no access to even get to my files to change it currently.

Really not sure who changed that code as that is something I don't understand.

I have not because: 1. I'm not sure where to put it since that part of the code is disabled for some reason. 2. I still have no access to even get to my files to change it currently.

Really not sure who changed that code as that is something I don't understand.

If you cannot connect to your server (files), the issue is not in CS-Cart

We had to disable the site due to high load so I can get to the files. I can access them now but still seeing plenty of other errors in my logs. This sucks as it has been 4 days now with essentially no website and everyone is pointing the finger at each other saying it's not their problem.

[01-Apr-2019 23:45:05 America/Chicago] PHP Warning: Tygh\Backend\Database\Mysqli::errorCode(): Couldn't fetch mysqli in /home/fastdeca/public_html/shop/app/Tygh/Backend/Database/Mysqli.php on line 174

[01-Apr-2019 23:45:05 America/Chicago] PHP Warning: Tygh\Backend\Database\Mysqli::errorCode(): Couldn't fetch mysqli in /home/fastdeca/public_html/shop/app/Tygh/Backend/Database/Mysqli.php on line 174
[01-Apr-2019 23:45:05 America/Chicago] PHP Warning: Tygh\Backend\Database\Mysqli::errorCode(): Couldn't fetch mysqli in /home/fastdeca/public_html/shop/app/Tygh/Backend/Database/Mysqli.php on line 174
[01-Apr-2019 23:45:05 America/Chicago] PHP Warning: Tygh\Backend\Database\Mysqli::affectedRows(): Property access is not allowed yet in /home/fastdeca/public_html/shop/app/Tygh/Backend/Database/Mysqli.php on line 156
[01-Apr-2019 23:45:05 America/Chicago] PHP Warning: Tygh\Backend\Database\Mysqli::errorCode(): Couldn't fetch mysqli in /home/fastdeca/public_html/shop/app/Tygh/Backend/Database/Mysqli.php on line 174
[01-Apr-2019 23:45:05 America/Chicago] PHP Warning: Tygh\Backend\Database\Mysqli::insertId(): Couldn't fetch mysqli in /home/fastdeca/public_html/shop/app/Tygh/Backend/Database/Mysqli.php on line 165
[01-Apr-2019 23:45:05 America/Chicago] PHP Warning: mysqli::real_escape_string(): Couldn't fetch mysqli in /home/fastdeca/public_html/shop/app/Tygh/Backend/Database/Mysqli.php on line 195
[01-Apr-2019 23:45:05 America/Chicago] PHP Warning: mysqli::real_escape_string(): Couldn't fetch mysqli in /home/fastdeca/public_html/shop/app/Tygh/Backend/Database/Mysqli.php on line 195

As far as I can see, mysqli is not installed on your server or configured incorrectly