Enéias Ramos de Melo
Enéias Ramos de Melo
The reason chdir() must remain in index.php is because on the next line: define('MAGENTO_ROOT', getcwd()); The function getcwd() is setting MAGENTO_ROOT incorrectly.
> > Or how about: > > ``` > > define('MAGENTO_ROOT', __DIR__); > > ``` > > I would prefer this solution a lot This solution is better :)
> It seems `getcwd()` is used in some other places though, and some in `lib/Zend` which we cannot modify to use `MAGENTO_ROOT` since it will be a composer dependency soon....
@justinbeaty I don't have a specific reason. I just think this should run without any errors. I found this error when I tried to run index.php from a different directory.
@justinbeaty what happens if you run index outside of public_html? Ex: php ./public_html/index.php
@fballiano my suggestion is to use chdir instead of __DIR__ So I think the change is totally valid.
@fballiano hackers do this. There's always a first time for everything.
@r-martins bora remover esse trem :)
> Obrigado pelo PR @eneiasramos . Só pra entender e conseguir testar, em que endpoint podemos obter o session id? Hoje temos o /pseguro/ajax/getSessionId (controller) pra isso. Entendo que do...
> @eneiasramos could you please write a real title and description? thanks! Sorry I forgot that my dear :smile_cat: