Guides & TutorialsUpdating WHMCS TroubleshootingAutomatic 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

The output here can seem overwhelming at first, but it needn't be. The only bit you need to be interested in is the error message immediately following the [RuntimeException] label (highlighted below).

In our case here, the error is saying a directory didn't exist and couldn't be created - this is a permissions related error.

Common errors and their resolutions

The following are the most common causes of automatic update failures and their solutions.

Permissions related issues

By far the most common issue for automatic updates is lack of permissions.

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

  • [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 that there is a permissions issue preventing the WHMCS Automatic Update application from being able to write to or delete files from the WHMCS directory.

For automatic updates to be successful, the web user under which the WHMCS application is running must have full read and write access to the WHMCS installation directory.

Other common errors and problems

Error Message
[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.