Guides & TutorialsTroubleshootingTroubleshooting UpdatesAutomatic Update Failed: Identifying the problem

Automatic Update Failed: Identifying the problem

You attempted to perform an automatic update but it failed and showed an error message such as the one below.

Identify the error

You can find the necessary information to resolve your issue in the error message. Often, this is immediately following the [RuntimeException] label. For example:

In the example above, the error indicates that a directory didn't exist and the system could not create it. This is a permissions-related error.

Common errors and their resolutions

The following issues are the most common causes of automatic update failures:

Permissions-related issues

A permissions error can be indicated by any of the following error messages:

  • Error: Apply update dry-run permission issues
  • [RuntimeException] /path/to/directory does not exist and could not be created
  • [RuntimeException] Could not delete /path/to/file.php
  • [ErrorException] mkdir(): Permission denied
  • Error: chmod(): Operation not permitted
  • [ErrorException] file_put_contents(/path/to/file): failed to open steam: Permission Denied
  • [WHMCS\Exception] Unable to copy /path/to/file.php to /path/to/file.php.

All of the above indicate a permissions issue preventing the WHMCS Automatic Update application from writing to, executing, or deleting files from the WHMCS directory.

For automatic updates to succeed, the user under which the WHMCS application is running must have full access to the WHMCS installation directory.


More Information:


Other common errors and problems

Error Message Solution
[ErrorException] ZipArchive::extractTo(/path/to/file.php): failed to open stream: Disk quota exceeded update This indicates that you have exceeded the available disk space for your web hosting account. Increase the disk space allowance and then try again.
[ErrorException] chmod() has been disabled for security reasons This indicates the chmod() PHP function is in the disable_functions list of the PHP configuration.

[RuntimeException] /path/to/directory does not exist and could not be created


In addition to the permission error outlined in the previous section, this error could also be caused by insufficient free disk pace. Please ensure that at-least 250MB disk space is available before performing an update.
The temporary update path is not valid. Please specify a writable temporary update path to proceed with update. The system cannot write to the temporary update path specified in the Configure Update Settings modal at Utilities > Update WHMCS .
Ensure a valid absolute path is specified: Configuring the Temporary Path.
A fatal error occurred while fetching the update.
Please check to make sure your memory limits and execution time are set to the recommended values.
A timeout occurred which prevented the update process from completing successfully.
Refer to Troubleshooting A fatal error occurred while fetching the update Error for detailed diagnosis and resolution information.
cURL error 28: Operation timed out after 300000 milliseconds with xxxxxx out of yyyyy bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) A network connectivity issue means that the process to download the new files could not be completed within 300 seconds.
Please work with your network administrator to improve connectivity to releases.whmcs.com or try again later.

As a potential workaround, temporarilly add the following line to the WHMCS configuration.phpfile to increase the PHP timeout at runtime:
$overidephptimelimit = '600';