Problem/Motivation

I have installed and configured the simplesamlphp module. Everything has a green check mark on the simplesamlphp configuration page except for "predis/predis (required if the redis data store is used)" which I am not using. When I go into Drual > Manage > Configuration, I see the following message: "There is a Simplesamlphp configuration problem. The configuration (config/config.php) is invalid: Missing configuration file".

I have copied a new config.php file from simplesaml/config-templates to simplesaml/config and that has not fixed the error.

What did I do wrong and how do I fix?

SimpleSamlPHP ver: 8.x-3.2
Drupal ver: 8.9.6
PHP ver: 7.3.20-1+0~20200710.65+debian10~1.gbpc9cbeb
Apache/2.4.38 (Debian)
Docker / DDev environment

Comments

jbreslow created an issue.

jbreslow’s picture

This appears to have fixed it.

Adding "SetEnv SIMPLESAMLPHP_CONFIG_DIR /var/simplesamlphp/config" to apache-site.conf file. Make sure the path matches your path.

https://simplesamlphp.org/docs/1.14/simplesamlphp-install#section_6

nixklai’s picture

I am encountering the same issue on a Nginx server:

O/S and version: Ubuntu 20.04.2 LTS
Web Server and version: nginx/1.19.10
PHP version: 7.4.3
Drupal version:9.1.8
SimpleSAMLphp version: 1.19.1
simplesamlphp_auth version: 8.x-3.2

In the administrator panel, the following error this shown:

There is a Simplesamlphp configuration problem. The configuration (config/config.php) is invalid: Missing configuration file

When I visit `saml_login` page, it shows the following:

The website encountered an unexpected error. Please try again later.

SimpleSAML\Error\ConfigurationError: The configuration (config/authsources.php) is invalid: Missing configuration file in SimpleSAML\Configuration::loadFromFile() (line 169 of vendor/simplesamlphp/simplesamlphp/lib/SimpleSAML/Configuration.php).

SimpleSAML\Configuration::getConfig() (Line: 368)
SimpleSAML\Auth\Source::getById() (Line: 68)
SimpleSAML\Auth\Simple->getAuthSource() (Line: 168)
SimpleSAML\Auth\Simple->login() (Line: 111)
SimpleSAML\Auth\Simple->requireAuth() (Line: 131)
Drupal\simplesamlphp_auth\Service\SimplesamlphpAuthManager->externalAuthenticate() (Line: 200)
Drupal\simplesamlphp_auth\Controller\SimplesamlphpAuthController->authenticate()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 57)
Drupal\Core\StackMiddleware\Session->handle() (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch() (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup() (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 49)
Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 706)
Drupal\Core\DrupalKernel->handle() (Line: 19)

My guess would be, for some reason, the extension is pointing to the internal SimpleSAMLphp within the Drupal `vendor` folder instead of the instance I configured in `/var/simplesamlphp`. However, I can't really find a way to address that.

It turns out the information is in the README all along. In case you experience the error above, and you are installing your SimpleSAMLphp outside your Drupal (like installing in `/var/simplesamlphp`), you will needed stated that clearly in your `sites/default/settings.php` file with the following statement:

$settings['simplesamlphp_dir'] = '/var/simplesamlphp'; // if your SimpleSAMLphp is in /var/simplesamlphp

A quick note: Remember Drupal, despite using the latest version, may have several composer packages still lacking behind. Make sure the version you use is the same across Drupal and SimpleSAMLphp.

dmitrii puiandaikin’s picture

I noticed that in newer versions contains config.php in "config-template" folder, not "config"