Invalid origin error Matomo 4.10.1 on IIS

I was on 4.3.1 and was getting an error message of :Form security failed, please reload the form and check that your cookies are enabled, in every browser except safari Mac. Including Explorer and chrome on windows and chrome and firefox on mac.

I upgraded to the current 4.10.1 version and the database upgraded fine and now I get the error message " Error : Form security failed, invalid origin. If you previously connected using https, please ensure you are connecting over a secure (SSL/TLS) connection and try again." I’ve googled all morning without luck.

I am using IIS 8 onsite, MySQL 5.5.44, PHP 7.4.21. I have deleted tmp files, cookies, used private/incognito windows. When I attempt to login in browsers other than Safari I get no errors in the php log file, When I login successfully in safari I get these errors that I don’t think are causing my login problem.

[13-Jul-2022 20:05:04 UTC] PHP Fatal error: Uncaught Error: Class ‘Piwik\Plugins\Provider\Provider’ not found in D:\Production\matomo\plugins\UserCountry\LocationProvider\DefaultProvider.php:78
Stack trace:
#0 D:\Production\matomo\plugins\UserCountry\LocationProvider\DefaultProvider.php(43): Piwik\Plugins\UserCountry\LocationProvider\DefaultProvider->getCountryUsingProviderExtensionIfAvailable()
#1 D:\Production\matomo\plugins\UserCountry\VisitorGeolocator.php(146): Piwik\Plugins\UserCountry\LocationProvider\DefaultProvider->getLocation()
#2 D:\Production\matomo\plugins\UserCountry\VisitorGeolocator.php(115): Piwik\Plugins\UserCountry\VisitorGeolocator->getLocationObject()
#3 D:\Production\matomo\plugins\UserCountry\Columns\Base.php(55): Piwik\Plugins\UserCountry\VisitorGeolocator->getLocation()
#4 D:\Production\matomo\plugins\UserCountry\Columns\City.php(43): Piwik\Plugins\UserCountry\Columns\Base->getLocationDetail()
#5 D:\Production\in D:\Production\matomo\plugins\UserCountry\LocationProvider\DefaultProvider.php on line 78
[13-Jul-2022 20:05:08 UTC] PHP Fatal error: Uncaught Error: Class ‘Piwik\Plugins\Provider\Provider’ not found in D:\Production\matomo\plugins\UserCountry\LocationProvider\DefaultProvider.php:78
Stack trace:
#0 D:\Production\matomo\plugins\UserCountry\LocationProvider\DefaultProvider.php(43): Piwik\Plugins\UserCountry\LocationProvider\DefaultProvider->getCountryUsingProviderExtensionIfAvailable()
#1 D:\Production\matomo\plugins\UserCountry\VisitorGeolocator.php(146): Piwik\Plugins\UserCountry\LocationProvider\DefaultProvider->getLocation()
#2 D:\Production\matomo\plugins\UserCountry\VisitorGeolocator.php(115): Piwik\Plugins\UserCountry\VisitorGeolocator->getLocationObject()
#3 D:\Production\matomo\plugins\UserCountry\Columns\Base.php(55): Piwik\Plugins\UserCountry\VisitorGeolocator->getLocation()
#4 D:\Production\matomo\plugins\UserCountry\Columns\City.php(43): Piwik\Plugins\UserCountry\Columns\Base->getLocationDetail()
#5 D:\Production\in D:\Production\matomo\plugins\UserCountry\LocationProvider\DefaultProvider.php on line 78

Aslo, I get a 500 server error when I try to do a system check in Safari.

For ‘Piwik\Plugins\Provider\Provider’ not found
here is the solution : https://github.com/matomo-org/matomo/issues/18505#issuecomment-995245279

Remove from config.ini.php
PluginsInstalled[] = "Provider"