Skip to content

Main index.php and pub/index.php are Out of Sync #372

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

Closed
astorm opened this issue Oct 4, 2013 · 4 comments
Closed

Main index.php and pub/index.php are Out of Sync #372

astorm opened this issue Oct 4, 2013 · 4 comments

Comments

@astorm
Copy link

astorm commented Oct 4, 2013

The file at

pub/index.php

is out of sync with the file at

index.php

The file in pub still contains an unname spaced Mage_Profiler, which results in a fatal error when run vs. the new repository.

There files should be brought into sync, or if pub/index.php is redundant it should be removed from the repository.

@davidalger
Copy link
Member

I would seriously like to see the ./index.php entry point removed, thus forcing the use of ./pub/index.php or manually creating one outside of pub if you really lack the flexibility to specify ./pub/ as the web root. It makes way more sense to push for the use of the more secure and modern location of a primary entry point, with the application code physically located outside of the web root.

@clockworkgeek
Copy link

I would also like to see the more secure pub entry point made de facto, it is the typical Zend style. Unfortunately, this precludes the popular practice of having Magento in a sub-folder of a website. Not everyone wants Magento to be their entire site.

@davidalger
Copy link
Member

That should still be possible were the ./index.php entry point to be eliminated. You would put the pub directory where you wanted Magento to run and update these two lines in the pub entry point, the first load the bootstrap.php file relative to where the entry point was placed and the second to define what to use in links to materialized assets:

    require __DIR__ . '/../app/bootstrap.php';
    $params[\Magento\Core\Model\App::PARAM_APP_URIS][\Magento\Core\Model\Dir::PUB] = '';

@verklov
Copy link
Contributor

verklov commented Sep 9, 2014

The team synced the main index.php file and those located in the pub folder. We are closing this ticket now.

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

No branches or pull requests

4 participants