Skip to content

Conversation

@sfritzsche
Copy link

Change extraction method

Description

In our server environment, the "Document Root" could not be read correctly.

Instead of reading the document root via "$this->request->getParam('DOCUMENT_ROOT')", the following command worked:

$this->request->getServer('DOCUMENT_ROOT')

This is also used by the Magento core:

https://github.com/magento/magento2/blob/c3ab314c5e51cb91c96f161d82db92370cd7d9b8/app/code/Magento/Sitemap/Model/Sitemap.php#L766

It is possible that other parameters are also affected:

REMOTE_ADDR
HTTP_HOST
SERVER_NAME

Change extraction method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant