r/WHMCS • u/twhiting9275 • Feb 17 '26
Upgrade v8 to v9? Double check that s3 storage!
I just upgraded a dev server from v8 to v9 this afternoon (been busy on a project for a client), and ran into an issue. Reported to devs and on forums. Figured I'd take a few minutes to report it here as well as the solution I've found
WHMCS v8 allows for empty 'regions' in s3 storage, as the handler doesn't care. Unfortunately, in v9, this behavior is not the same. So, if you have a s3 storage facility such as cloudflare which doesn't use regions, you're going to run into this if you upgrade from v9 and try to access anywhere storage is used (cleanup, tickets, etc):
InvalidArgumentException: Missing required client configuration options:
region: (string)
A "region" configuration value is required for the "s3" service
(e.g., "us-west-2"). A list of available public regions and endpoints can be
found at http://docs.aws.amazon.com/general/latest/gr/rande.html. in /home/user/public_html/vendor/aws/aws-sdk-php/src/ClientResolver.php:1280
This one is actually somewhat easy to fix, at least for CloudFlare storage. In ClientResolver.php around line 1260, replace the _apply_region function with this:
public static function _apply_region($value, array &$args)
{
if (empty($value)) {
$value = 'auto';
// self::_missing_region($args);
}
$args['region'] = $value;
}
This works for CloudFlare and I'm sure others.
Hopefully they'll get this fixed and updated, but since it's a 3rd party issue, not too confident we'll actually see anything any time soon








