Guides & Tutorials7.3 Update TroubleshootingTroubleshooting a File could not be downloaded error

Troubleshooting a File could not be downloaded error

Error Details

It has been observed that the auto-update process can fail on certain server configurations with a The "https://releases.whmcs.com/packages.json" file could not be downloaded: SSL operation failed with code 1 error message.

The full error is as follows:

Error: failed to open stream: operation failed
Failed to enable crypto
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
The "https://releases.whmcs.com/pkgs/whmcs-7.3.0-release.1.zip" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
[Composer\Downloader\TransportException]
Downloading
- Installing whmcs/whmcs (7.3.0)
Updating dependencies
https://releases.whmcs.com could not be fully loaded, package information was loaded from the local cache and may be out of date
failed to open stream: operation failed
Failed to enable crypto
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
The "https://releases.whmcs.com/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
Loading composer repositories with package information

Cause

This error message indicates that the application is unable to confirm the validity of the SSL certificate. There are two potential causes for this:

  1. The server's CA Bundle is out-dated and therefore does not contain the necessary information to validate the SSL certificate
  2. An open_basedir restriction in PHP prevents the application from accessing the server's CA Bundle to perform the validation.

 

Solution

Depending upon the underlying cause, the ideal solution is to either:

  1. Update the CA Bundle on the server. Or,
  2. Update the open_basedir settings in PHP to include the path to the CA bundle file in the server's Operating System.

Both solutions will most likely require working with your server administrator/hosting provder.

Workaround

A quick workaround has been identified by disabling open_basedir directive in the applicable php.ini file.

Please work with your server admin/hosting provider to make the necessary adjustment to your server configuration. The following screenshot shows how to make the modification within cPanel/WHM:

Once the solution or workaround has been applied, initiating the auto-update process via Utilities > Update WHMCS will then be successful.