After attempting to use the auto updater for the first time it failed with the error:
Error (Help Documentation)
Error: Failed to perform early file copy during WHMCS file relocation: vendor/whmcs/whmcs-foundation/lib/Application.php
[WHMCS\Exception]
Script WHMCS\Installer\Composer\Hooks\ComposerInstallerHook::postUpdateCmd handling the post-update-cmd event terminated with an exception
Relocating WHMCS core files...
Skipping: downloads
Skipping: templates_c
Skipping: attachments
Skipping: crons
Preparing to relocate WHMCS core files...
An existing installation has been found - updating...
-------------------------------------
WHMCS Installation/Update Assistant
-------------------------------------
> WHMCS\Installer\Composer\Hooks\ComposerInstallerHook::postUpdateCmd
Generating autoload files
Writing lock file
File signature was validated
Certificate used for signature validation was loaded and validated
File hash was validated. Hash: 0169a218b9e066c1809afb65113beb55ae5c934b8f4496642262bcd13f9081dc
Validating /var/www/sites/example.com/htdocs/vendor/whmcs/whmcs/4a4b22f8aa92f0a87aa907d4e3a29aa8.zip
Downloading
- Installing whmcs/whmcs (7.2.2)
Updating dependencies
Loading composer repositories with package information
At this point, WHMCS completely failed and I was getting 500 errors with the following message in the logs:
PHP Fatal error: Interface 'Whoops\\RunInterface' not found in /var/www/sites/example.com/htdocs/vendor/whmcs/whmcs/vendor/whmcs/whmcs-foundation/lib/Utility/Error/Run.php on line 0, referer: https://example.com/admin/update.php
So it was apparent that WHMCS didn't make something more clear in terms of how a path should be structured in a configuration dialog. The problem became, tracking down how to fix this. After digging a bit I was able to isloate out that the URLs were orchestrated by composer (pun intended) and could find this in the following file:
$ cat vendor/composer/autoload_psr4.php
<?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'WHMCS\\' => array($vendorDir . '/whmcs/whmcs/vendor/whmcs/whmcs-foundation/lib'),
);
I fixed this up removing
/whmcs/whmcs
from the path prefix. Changing into
/whmcs/whmcs
I found the contents of what _should_ have gotten moved to my htdocs directory. After moving this into place, I was force to hit the
/install
URL, but got things back online.