Drupal 406 error can happen as a result of a number of reasons which include disabling XML-RPC, security restrictions, and so on.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to resolve related Drupal errors.
Causes and fixes for Drupal 406 error ?
Sometimes while changing the admin/settings page or while using the Drupal login module, users receive an error as shown below:
An appropriate representation of the requested resource could not be found on this server.
Below, we will look into how to fix this error.
1. Using XMLRPC
To fix the security holes with older versions of XMLRPC libraries, some hosting providers may disable xmlrpc.php scripts. While we enable the BlogAPI module or the Drupal login module on such a provider, our Support Engineers notices "406 errors".
A possible solution here that we follow is to rename the xmlrpc.php file in drupal’s main directory.
We will then alter blogapi.module to point to the newly renamed file, as well as any other modules that point to xmlrpc.php.
2. Special characters in the folder name
At times, the 406 error may trigger due to characters like “/” in the folder name. For instance, we have noticed this error when the field for the temporary directory was set as "/tmp". The leading slash here was creating some chaos in the headers passed from the apache to the browser.
We can fix the error in such cases by changing the folder name to one without the slash character
3. Drupal 406 error due to security settings
The security settings at the server-side may also trigger the 406 error at times. We are able to fix this error by adding the following line to the .htaccess file:
[Need any further assistance in fixing Disk space errors in WordPress? – We're available 24*7. ]