Enéias Ramos de Melo

Results 19 comments of 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.

> 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: