---
title: "What should I do when getting an error opening required file?"
date: "2025-05-27T09:49:18+00:00"
summary: "Learn how to fix the \"Error opening required file\" in Drupal's Test stage. Step-by-step guide to update your settings.php file."
image:
type: "article"
url: "/acquia-cloud-platform/add-ons/code-studio/help/69321-what-should-i-do-when-getting-error-opening-required-file"
id: "0310c716-1c1c-4d8f-a259-83c1caed152f"
---

**Description**

**Build stage**

**Job**

**Error message**

**Category**

**Responsibility**

[Test Drupal](https://docs.acquia.com/acquia-cloud-platform/add-ons/code-studio/docs/customizing-code-studio/drupal-auto-devops/autodevops-jobs#section-test-drupal-stage)

[Test Drupal](https://docs.acquia.com/acquia-cloud-platform/add-ons/code-studio/docs/customizing-code-studio/drupal-auto-devops/autodevops-jobs#section-test-drupal-job)

`Error: Failed opening required '/var/www/site-php/<APP>/<APP>-settings.inc'`

Application

Customer

**Solution**

You must update the `if` statement in the Cloud Platform database settings as follows:

1.  In the `settings.php` file of your project, locate a statement similar to the erroneous statement. For example:
    
        if (file_exists('/var/www/site-php')) {
            require('/var/www/site-php/<APP>/<APP>-settings.inc');                                                                                                                                               }
    
2.  Update the `if` statement to specify the complete path to the file:
    
        if (file_exists('/var/www/site-php/<APP>/<APP>-settings.inc')) {