Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get document root from server #25

Open
wants to merge 1 commit into
base: 2.4
Choose a base branch
from
Open

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